I’m trying to create DatePicker dialog from a class that doesn’t extends the Activity class. I need DatePicker in a class called EnterDate which has Context attribute containing Activity Context.
All examples of DatePicker on the WEB are basic ones written in Activity class and that’s why they confusing me.
I want date picker which works good on Android lower then 3.0. I don’t use XML layout.
So basically I need suggestion where to put onCreateDialog() , how to retrieve chosen time, etc.
I’ve Button which have onClickListener() for calling a DatePicker.
An hour ago I’ve asked a same question for the TimePicker and got this answer:
How to create a TimePicker from class which do not extends Activity, Android?
I assume that that solution needs only minor modification to work like DatePicker..
Tnx
modified class
and..