How to implement NumberPicker package in Android API 7?

There is a NumberPicker widget in API 11, but I'm building a minimal API 7. How can I implement it? Is there a custom widget that I can use, or is there a way to get the components that make up the DatePicker / TimePicker?

+6
source share
4 answers

I think this is very good and flexible, given that at the beginning of 2012 there were several ready-made options available at this api level when they asked this question.

http://code.google.com/p/android-wheel/

EDIT: So, what if iOS has similar controls. This does not make this answer bad. Android is freedom of choice. In addition, the appearance of this control depends on the styles. Remove the shadow, add blue highlights and it will look like an Android 4 selection timer, as requested by the OP.

I point out a possible solution to the problem of people. I am NOT a supporter that Android apps should look like iOS apps, and I personally hate Android apps that are poorly ported, which is why they are clones of their iOS versions. Some people are really fans.

+9
source

copy the NumberPicker code in API11 into your project.

The huyao message is not working. NumberPicker has API11 dependencies (android.animator. *) That cannot be easily replaced. You must take one of these libraries.

+1
source

Perhaps this DigitSpinner class is useful ...

0
source

copy the NumberPicker code in API11 into your project.

-3
source

Source: https://habr.com/ru/post/908004/


All Articles