Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Android graphics: Draw rectangle whose dimesnions can be programmatically changed

 
Madhu Nandan
Ranch Hand
Posts: 52
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
down vote favorite


Hello,

I have a layout- an ImageView with TextViews on its top and bottom. Now I want to add a rectangular vertical bar (to the left or right of this setup) which changes its height (and also colour) from bottom to top. At the moment, I have used a TextView which increases height from top to bottom (I couldn't make it the other way round).

I don't know how to use graphics to draw a rectangle and then add that rectangle to the above xml layout (with an ImageView and 2 TextViews).

Please suggest a way to do this-either to increase the height of TextView from bottom to top or a different better way than what I am following.

Thank you for your time.

Cheers,

Madhu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic