Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In case you are allowed to implement it dynamically here are some hints:</p> <ol> <li><p><strong>Create separate images</strong>(backgrounds)</p> <ul> <li>1 image for the knob</li> <li>1 image for each small button</li> <li>1 image for the background</li> </ul></li> <li><p><strong>Radius</strong> </p> <ul> <li>measure the distance from the center of the background to the point where a small button should be placed (the radius of the background pattern) in pixels.</li> <li>you might need different sizes for different screens (different resolutions)</li> </ul></li> <li><p><strong>Place the buttons</strong>:</p> <ul> <li>place the background image and the knob <a href="http://developer.android.com/reference/android/widget/ImageButton.html" rel="nofollow">ImageButton</a> so that the center of the knob matches the center of the background - both images should be rectangular, so the central point should be at the crossing point of the diagonals</li> <li>use <a href="http://en.wikipedia.org/wiki/Spherical_coordinates" rel="nofollow">spherical coordinates</a> to <a href="http://en.wikipedia.org/wiki/Spherical_coordinates#Cartesian_coordinates" rel="nofollow">retrieve</a> the cartesian (x,y) coordinates of the small buttons - their centers should lie on those points</li> </ul></li> <li><p><strong>Hit test</strong></p> <ul> <li>all your images should have transparent background</li> <li>you can implement the hit test to be successful only when the event is in the non-transparent part of the ImageButton background</li> </ul></li> <li><p><strong>Rotation</strong></p> <ul> <li>To rotate the knob you can look for more info about rotating an ImageButton's background. I haven't tried something like this...</li> </ul></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload