Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Working with Android DatePicker is such a pain in the ass.
You want to have your DatePicker appearing as a SpinnerView? Well, easy!
If you're under API 21, you can use the following method 'setSpinnerViewShown()'. If you're between API 21 and API 23 you need to add some style configuration. And if you're above of API 23 you can't use both of the methods above, you need to create a custom xml with the attribute "datePickerMode" (no, datePickerMode can't be set programmatically, it would be too easy to guess).
If you want to add a listener to it, you think it might be a method called 'setDateChangeListener' or something like this? Well no! You must use the 'init(year, month, day, Listener)' method, logic!
If you think you're finished with this bullshit, of course not. Their is a known bug on API 21 that you must take into account (but this bug isn't fixed, no, it's just documented somewhere on google forums).
I don't know the team that designed the DatePicker for Android, but it might a team of champanzee that randomly changed their minds to the phases of the moon!
undefined
bullshit
android
random
datepicker