Skip to content Skip to sidebar Skip to footer

How Can I Put Date And Time Picker In A Dialog In Android

i an new in android and struggling with how can i add these two date picker and time picker in a single dialog box please guide me how can i do it i created a dialog box and use a

Solution 1:

I have created a project on github for this. I have taken a different approach than yours and have created the custom dialog with date and time picker, by extending the dialog class.

https://github.com/ramesh130/DateTimePickerDialog

Solution 2:

You should use R.layout.linearLayout1,not R.id.linearLayout1,like this:

View pickers=getLayoutInflater().inflate(R.layout.linearLayout1,null);

assuming the name of your layout file is linearLayout1.

Post a Comment for "How Can I Put Date And Time Picker In A Dialog In Android"