tags:

views:

139

answers:

1

I am looking to create a radial menu in a game that I am writing. Is there a class or API included to assist with this or an open source solution?

Something like this.

Thank you, Jake

A: 

There's no built in API for such menus, however, there's at least two ways to do this

1) Build a layout representing your "menu" and attach it to the "FrameLayout" at the root of your android view. By adjusting the positioning of the element just before you make it visible, you can move it around the scree. This method is a little "hacky", but it should work.

2) Build a completely custom component, including your own drawing methods and onTouch events, and attach it to your view. This method is quite a bit more complex (you'll need to implement all of the drawing methods), but is also somewhat more general.

In either case, remember that you'll need to consider how the radial menu functions when the user is using the trackball/d-pad.

jwriteclub
That is what I assumed, but I was hoping the custom component already existed. Thanks for the info.
Jake Hulse