I am attempting to use a datepicker dialog based on the example at
http://developer.android.com/resources/tutorials/views/hello-datepicker.html.
This is obviously for an activity, but I'm trying to implement the
same functionality in a fragment.  Using the code from the example
won't work.  By this, I mean the following code snippet does not
actually open the dialog:

...
mPickDate = (Button) mRootView.findViewById(R.id.button_leave_date);

// add a click listener to the button
mPickDate.setOnClickListener(new View.OnClickListener() {
       public void onClick(View v) {
                mActivity.showDialog(DATE_DIALOG_ID);
       }
});
...

After reading various sources online, I know "showDialog" is
deprecated and the recommendation is to use the DialogFragment.
However, is there an option to generate a date picker dialog with this
implementation?  I've been unable to find any good examples of anyone
trying this - so if there are resources available to merge the
(deprecated) example on the Android Developer web site with an actual
DialogFragment implementation, I would really appreciate it.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to