ibrahim demir
ibrahim demir

Reputation: 461

Which API is DatePicker changed?

I'm designing a big android project. 5 months ago I have designed a good UI by editing Datepicker like this:

The Datepicker with + and - buttons

But after I changed my computer and moved project to new computer, I get an error on getChildAt(int). Then I removed all modifications on it and saw the datepicker like this :

The Datepicker with previous and next value

Any idea on why it is changed? or How can I change it to old version?

(P.s : I currently use API 15)

Upvotes: 0

Views: 104

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006829

But after I changed my computer and moved project to new computer, I get an error on getChildAt(int)

Your code incorrectly assumed that the implementation of DatePicker would never change.

Any idea on why it is changed?

Because Google wanted to change it.

How can I change it to old version?

Find the source code to the old version and fork it to create your own LegacyDatePicker or some such. You would want the implementation from Android 2.3, I imagine.

The implementation of DatePicker is up to the Android framework, and it will vary over time. I would not be surprised if the next version of Android has yet another look.

Upvotes: 2

Related Questions