Implement iOS like time picker in Android

百般思念 提交于 2019-12-19 10:57:10

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/12385377/implement-ios-like-time-picker-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!