Replicating the iOS time picker in Android

佐手、 提交于 2019-12-08 12:35:38

问题


I'm trying to write an app that would use the timepicker in Android, but I really would like to implement the one from iOS.

I've had a couple of leads, but haven't struck anything that has worked for me.

My problem is that the time picker is for time but I want to use mine for three different number values that can be chosen (no am/pm) so it seems like Pickers are the way to go, except that they were introduced in API 11.

I've found this blog that seems to give you some code for it, but I wasn't able to get it to work.

I also found android-wheel, but I don't know how to get the source for it. Can anyone steer me in the right direction for it?

The iOS timepicker looks like this:

Android wheel looks like this:

But, I haven't been able to figure out how to get the code for it.


回答1:


The code is in the google code project - https://code.google.com/p/android-wheel/source/browse/




回答2:


Download the source code from below link for various wheel example:

http://android-wheel.googlecode.com/svn/trunk/

Make sure that you have the svn plugins for download.

Thanks.




回答3:


I was able to use the android wheel code through svn tortoise.



来源:https://stackoverflow.com/questions/11284200/replicating-the-ios-time-picker-in-android

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