• 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: Add custom widget or view (ex. vertical bar) which changes height programmatically

 
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
Hello,

I have modified the main.xml to include an ImageView and two text views-one each on top and bottom of the ImageView. I set the image and the text to be displayed. Now I want to add another vertical bar to the left or right of this setup (one image view and two text views) and I want to programmatically increase or decrease the height of this vertical bar. I tried using a TextView and set it's height with TextView.setHeight(int variable) but this does not work and I get an error.

Please tell me if my approach is right (I guess it is not) or kindly inform me of any better way of doing this.

Cheers,
Madhu

main.xml



Main activity:

reply
    Bookmark Topic Watch Topic
  • New Topic