• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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
 
Create symphonies in seed and soil. For this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic