Implement iOS like time picker in Android

2019-02-20 11:50发布

I'm looking to implement a time picker like below in Android.

I've already looked at http://tolkianaa.blogspot.mx/2012/04/how-to-use-android-wheel-part-ii.html but he has multiple xml files and multiple classes seemingly so I can't see how thats going to work. (Am I missing something?)

I have android-wheel installed so this question is useless Replicating the iOS time picker in Android

The demos from android wheel don't seem to really accommodate it.

Anyway, does anyone have a better way of implementing this is android?

enter image description here

2条回答
再贱就再见
2楼-- · 2019-02-20 12:33

You should have a look at the AOSP source code, a clock app is included I think it is the default one that is shipped with ICS & JB (but I have not compiled it to verify).
Also, the official website always have some useful info, you should try to start with this widget. The illustration seems to indicate that it uses buttons instead of swiping, which is strange but even if it is the case it will be a good start to implement a swiping version of this widget.
@Lokesh's link also seems to also fit your needs.

查看更多
孤傲高冷的网名
3楼-- · 2019-02-20 12:39

Just go through this link. It was helpful to you with full source code and high scrolling speed. http://lokeshatandroid.blogspot.in/2012/07/custom-wheel-widget.html

查看更多
登录 后发表回答