Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement wheel widget like in iPhone?

I would like to implement a time settings wheel widget like the one iPhone has (http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/art/ui_datetimepicker.jpg).

  1. Should I use GlSurfaceView or just extend View?
  2. Should I make it as a compound View (it would consist of several Views) or draw everything on the Canvas in onDraw?
  3. In case I won't extend GlSurfaceView, how to do (smooth) animations? Start a Thread and call postInvalidate()?
like image 514
fhucho Avatar asked Sep 20 '10 18:09

fhucho


2 Answers

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

like image 166
Mark B Avatar answered Sep 28 '22 09:09

Mark B


I've put my code for an animated wheel widget here:

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

like image 32
sinkpoint Avatar answered Sep 28 '22 11:09

sinkpoint