This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing position of Button at Runtime  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Hey i have scenerio where i have to change the position of Button at Runtime.... is there any method like setx(int i) and setY(int i)... if not can any one tell how can i do it...?
 
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, position is determined by the container, not by the widget. So, tell your container (e.g., LinearLayout, RelativeLayout) a new set of LayoutParams, and the widget will move.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!