3

For the below circle can I create individual buttons on the same circle for each and every zodiac sign

For the above circle can I create individual buttons on the same circle for each and every zodiac sign

ChrisF
  • 134,786
  • 31
  • 255
  • 325
srinivas
  • 65
  • 9
  • Yes give background to button... – Hardik Joshi Oct 16 '12 at 05:30
  • you can use imageButton and set a circle background to it – Syn3sthete Oct 16 '12 at 05:38
  • this link will help you : http://stackoverflow.com/questions/3914329/round-button-in-android – Parth Doshi Oct 16 '12 at 05:50
  • You can have a hint from this [link](http://www.codeproject.com/Articles/146145/Android-3D-Carousel) of putting Buttons in collection makes a *circle*. – AppMobiGurmeet Oct 16 '12 at 05:32
  • You can put that image as a linear layout and construct separate ButtonViews and spacing them out perfectly. However, this would be very buggy for multiple devices in which case you can choose to do some math and create the buttons through code and code it in a way in which the size will scale to the device size. I'd recommend you to take a look at canvas and have a button class that way you have much more control over what appears on the screen and the device size and the dimensions of the buttons and background image. – srinivas Oct 16 '12 at 06:20
  • may be helpful http://stackoverflow.com/questions/10222730/how-to-create-a-rotating-wheel-control – Mohammed Azharuddin Shaikh Oct 16 '12 at 07:14

1 Answers1

1

That image is probably way too complex to replicate with multiple views. The best thing you could do would probably be to just extend a View or ImageView, and then override the onTouch method.

In onTouch you can get the exact XY coordinates of the touch, and compare it with the known boundaries of all the individual clickable areas. Based on what area you click you can take a different action.

Tim
  • 35,413
  • 11
  • 95
  • 121