• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Android graphics: Draw rectangle whose dimesnions can be programmatically changed

 
Ranch Hand
Posts: 52
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic