Android Question Graphics

red30

Well-Known Member
Licensed User
Longtime User
There are three columns.They can change their height within the white area. Also they can change their colour. There is a black line (threshold) that change its height too. I need to turn these columns into buttons which will also change their height and colour. How can I draw this black line over the buttons?
Tell your ideas in the comments.
 

Attachments

  • wee.png
    1.7 KB · Views: 141

JordiCP

Expert
Licensed User
Longtime User
I would do this:

For the black line use a panel or a label with a given small height (1dip?) and its colour set to black
To move it, just change its layout "Top" property

For the buttons, do something similar. In order to allow them to "grow upwards", when you need to modify its height (for instance to "newHeight") change also its "Top" property to "fixedBottomCoordinate - newHeight".
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Why do you need Buttons?
You could use Panels and with Canvases draw everything onto the Panels and use the Click or Touch events of the Panels.
Another solution would be a unique Panel, draw everything onto it and use the Touch event.
Kowing the X and Y coordinates you know which column was touched.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…