This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Android: Add custom widget or view (ex. vertical bar) which changes height programmatically

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

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.



Main activity:

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic