I've written something like this before - you want a few icons arranged in 
a circle, and each icon is clickable?

I created a custom layout, extending the ViewGroup, overriding onMeasure 
and onLayout. In the Activity I made a listener that implements 
View.OnTouchListener. It checks if the area which you've touched is within 
the 'donut' which the icons circle around.

I assume you want to click on the icon, if you touch the icon and have not 
moved more than 10 pixels (Pythagoras distance) when you detect 
MotionEvent.ACTION_UP.

However I have not resumed work on this and it is closed source since it 
was developed for my employer. I'm not sure how you'd continue animating it 
when you fling it.

On Monday, May 7, 2012 4:51:38 AM UTC+8, Bernie Eng wrote:
>
> Does anyone have any ideas on how to create a rotating control? Something 
> that looks like this: 
> http://www.raywenderlich.com/9864/how-to-create-a-rotating-wheel-control-with-uikit
>
> I came across 2 blog posts which is pretty close to what I need but, not 
> quite:
>
>    - 
>    
> http://mindtherobot.com/blog/534/android-ui-making-an-analog-rotary-knob/and
>    - 
>    
> http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-rotating-dialer/
>
> The first one doesn't really animate when rotating, and while the second 
> one does animate, it uses one large bitmap and rotates it. Because the 
> control I'm looking for should actually be container for a few buttons 
> (they each need to react to clicks), I can't really use one large bitmap. 
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to