I have to develop an Android app that needs to be run on 2.2 devices; i'm using HoloEverywhereLib with which the UI is pretty good. I need to use a DatePicker; if i use the default component, it has a really ugly look:
I would like to have something like the new one:
Is there a way to do it?
If you want to have the default datepicker for Android HC+ you could just implement it by copying the code from the Android github framework mirror:
You'll need the DatePickerDialog:
And the AltertDialog.
You'll also have to import the resources. You can find them here. And you have to replace the Holo Theme in the AlertDialog with the HoloEverwhere equivalent of the dark and light theme
The easiest way to get the ice cream sandwich styled date picker is by using the ActionBarSherlock library.
Then create the dialog class:
The activity listener class:
The dialog can be launched with following from your activity:
Your activity then have to implement the listener and you are up and running.