-1

In Android Studio, I want to create an equilateral triangle inside a simple activity using 3 seek-bars as you can see in the following image:

equilateral triangle

I want to know if it is possible to do this by using XML.

Charles Annic
  • 865
  • 1
  • 8
  • 20

1 Answers1

0

If you really wanted to do this I'd suggest you subclass ViewGroup and override the onDraw() method.

Take each child (the three SeekBar views) and apply a rotation on each of them based on what index the child view is.

Honestly though you're trying to force the existing UI items to do something they're not really designed to do. You're better off building a completely custom View from scratch.

Brad
  • 9,113
  • 10
  • 44
  • 68
  • thanks for the answer, I want controlling each segment of the triangle. to get multiple shapes. like this one: http://i.stack.imgur.com/lSpSX.jpg My goal is not to draw numbers but other more complex shapes. I just want to understanding the principle. – Jacob Brown Aug 12 '16 at 10:09