user1276092
user1276092

Reputation: 513

Example to implement TimePicker in Android DialogFragment in Android 3.0

How to implement TimePicker in Android 3.0 . I am showing a dialog which implemented DialogFragment . In that DialogFragment if I click a button I need to display timepicker. I am not able to implement this in Android 3.0. Can anyone provide me source to implement time picker in Android 3.0 DialogFragment.

Thanks in Advance,

Upvotes: 0

Views: 2479

Answers (1)

Maxim
Maxim

Reputation: 4214

  1. Add dialog preference
  2. Place TimePicker control in the dialog
  3. Refresh preference when date/time picked

Look at here:

Also, install Code samples for SDK 11 (Honeycomb 3.0). There is ApiDemos project there which contains few examples of different DialogFragments. There is everything you need.

Upvotes: 2

Related Questions