Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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

like image 917
Adham Avatar asked Nov 19 '10 13:11

Adham


1 Answers

  1. Put them in a LinearLayout
  2. Give them each android:layout_width="0px"
  3. Give them each android:layout_weight="1"
like image 110
CommonsWare Avatar answered Sep 25 '22 00:09

CommonsWare