开发者

how to add 2 buttons horizontally with 50% width for each in android?

how to add 2 buttons horizontally with 5开发者_开发问答0% width for each ?


  1. Put them in a LinearLayout
  2. Give them each android:layout_width="0px"
  3. Give them each android:layout_weight="1"


Add both the buttons in linearlayout and give orientation as horizontal.And give width as zero dp for both buttons and layout_weight=1 for each.It will work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜