Android 我是否可以/如何设置许多按钮的权重,使每列占据屏幕宽度的1/3?
所以我对Android开发和XML相对来说比较陌生,所以我想知道是否有可能按照标题所说的那样做。如何制作所有这些按钮列,以使每一行按钮在正在创建的三个按钮之间平均分割。我想我只是错过了一些东西,因为我几乎肯定这是可能的,我一定不太明白怎么做 我将非常感谢任何帮助!另外,请忽略一些按钮名称,它们对应于每个按钮将播放的声音(这将是一个音板应用程序) 谢谢大家!Android 我是否可以/如何设置许多按钮的权重,使每列占据屏幕宽度的1/3?,android,xml,Android,Xml,所以我对Android开发和XML相对来说比较陌生,所以我想知道是否有可能按照标题所说的那样做。如何制作所有这些按钮列,以使每一行按钮在正在创建的三个按钮之间平均分割。我想我只是错过了一些东西,因为我几乎肯定这是可能的,我一定不太明白怎么做 我将非常感谢任何帮助!另外,请忽略一些按钮名称,它们对应于每个按钮将播放的声音(这将是一个音板应用程序) 谢谢大家! <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.android.soundboard.MainActivity">
<!-- a lot of buttons -->
<!-- row 1 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/button_ethanBradberry"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:id="@+id/button_stfu"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button_haha"
/>
<!-- row 2 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_ethanBradberry"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:id="@+id/button_ohNowIGetIt"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_ohNowIGetIt"
android:layout_alignRight="@+id/button_stfu"
android:layout_alignEnd="@+id/button_stfu"
android:id="@+id/button_whatTheFuck"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_whatTheFuck"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button_whyTheFuckULyin"
/>
<!-- row 3 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_below="@+id/button_ohNowIGetIt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/button_whyYouHeffBeMad"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_whyYouHeffBeMad"
android:layout_alignRight="@+id/button_whatTheFuck"
android:layout_alignEnd="@+id/button_whatTheFuck"
android:id="@+id/button_niggaYouGay"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_niggaYouGay"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button_hitMarker"
/>
<!-- row 4 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_whyYouHeffBeMad"
android:layout_alignRight="@+id/button_whyYouHeffBeMad"
android:layout_alignEnd="@+id/button_whyYouHeffBeMad"
android:layout_marginTop="5dp"
android:id="@+id/button_itsATrap"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_itsATrap"
android:layout_alignLeft="@+id/button_niggaYouGay"
android:layout_alignStart="@+id/button_niggaYouGay"
android:id="@+id/button_shutUpAndTakeMyMoney"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_shutUpAndTakeMyMoney"
android:layout_alignRight="@+id/button_hitMarker"
android:layout_alignEnd="@+id/button_hitMarker"
android:id="@+id/button_smokeWeedEveryDay"
/>
<!-- row 5 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_itsATrap"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:id="@+id/button_stop"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/button_stop"
android:layout_alignLeft="@+id/button_shutUpAndTakeMyMoney"
android:layout_alignStart="@+id/button_shutUpAndTakeMyMoney"
android:id="@+id/button_wow"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_wow"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button_twentyOne"
/>
<!-- row 6 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_stop"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:id="@+id/button_surpriseMotherFucker"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button_surpriseMotherFucker"
android:layout_alignLeft="@+id/button_wow"
android:layout_alignStart="@+id/button_wow"
android:id="@+id/button17"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button17"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button18"
/>
<!-- row 7 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_surpriseMotherFucker"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:id="@+id/button19"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button19"
android:layout_alignLeft="@+id/button17"
android:layout_alignStart="@+id/button17"
android:id="@+id/button20"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button20"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button21"
/>
<!-- row 8 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button19"
android:layout_alignRight="@+id/button19"
android:layout_alignEnd="@+id/button19"
android:layout_marginTop="5dp"
android:id="@+id/button22"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button22"
android:layout_alignLeft="@+id/button20"
android:layout_alignStart="@+id/button20"
android:id="@+id/button23"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button23"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button24"
/>
<!-- row 9 -->
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button22"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:id="@+id/button25"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button25"
android:layout_alignLeft="@+id/button23"
android:layout_alignStart="@+id/button23"
android:id="@+id/button26"
/>
<Button
android:text="New Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button26"
android:layout_alignRight="@+id/button24"
android:layout_alignEnd="@+id/button24"
android:id="@+id/button27"
/>
<!-- Ad -->
<!--
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true">
</com.google.android.gms.ads.AdView>
-->
如何设置许多按钮的权重,使每列占据屏幕宽度的1/3
那么,您希望每行有3个按钮,宽度完全相同,为1/3或可用空间?您应该使用布局\u width=“match\u parent”
将每一行水平包装起来。然后您应该在其中放置3个按钮,并设置每个按钮的布局\u width=“match\u parent”
和布局\u weight=“1”
或者,对于每一行,您可以使用“从支持库”而不是“使用LinearLayout
来设置按钮宽度,而不是使用app:layout\u widthPercent=“33%”
。在这种情况下,您不需要设置layout\u weight
,但您需要在应用程序中包含supportlibrary,因此并非总是必要的
我还将用
替换您的
,替换为orientation=“vertical”
您要做的是将按钮拆分为不同的布局。对于我假设您想要的网格状结构,最好使用一些LinearLayout
,如下所示
<?xml version="1.0" encoding="utf-8"?>
这将为您提供3行3个按钮。由于布局宽度为0,所有按钮的重量相等,且重量与其他按钮相同。这样他们就把空间均匀地分开了。
每一行都在它自己的线性布局中,因此它堆叠在具有垂直方向的父容器中
如果您在静态屏幕上进行规划,这是一种方法。如果您需要查看GridView
或RecyclerView
谢谢您Marcin Orlowski,因为您的回复,我找到了如何以我想要的方式获取它的方法。我的XML现在如下所示。再次感谢你
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.android.soundboard.MainActivity"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:paddingTop="2dp"
>
<!-- a lot of buttons -->
<!-- row 1 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/ethan_bradberry"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_ethanBradberry"
/>
<Button
android:text="@string/shut_the_fuck_up"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_stfu"
/>
<Button
android:text="@string/HaHa"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_haha"
/>
</LinearLayout>
<!-- row 2 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/oh_now_i_get_it"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_ohNowIGetIt"
/>
<Button
android:text="@string/what_the_fuck"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whatTheFuck"
/>
<Button
android:text="@string/lying"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whyTheFuckULyin"
/>
</LinearLayout>
<!-- row 3 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/why_you_haff_be_mad"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whyYouHeffBeMad"
/>
<Button
android:text="@string/nigga_you_gay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_niggaYouGay"
/>
<Button
android:text="@string/hit_marker"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_hitMarker"
/>
</LinearLayout>
<!-- row 4 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/its_a_trap"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_itsATrap"
/>
<Button
android:text="@string/shut_up_and_take_my_money"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_shutUpAndTakeMyMoney"
/>
<Button
android:text="@string/_smoke_weed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_smokeWeedEveryDay"
/>
</LinearLayout>
<!-- row 5 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/stop"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_stop"
/>
<Button
android:text="@string/wow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_wow"
/>
<Button
android:text="@string/twenty_one"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_twentyOne"
/>
</LinearLayout>
<!-- row 6 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/Surprise_Mother_fucker"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_surpriseMotherFucker"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button17"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button18"
/>
</LinearLayout>
<!-- row 7 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button19"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button20"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button21"
/>
</LinearLayout>
<!-- row 8 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button22"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button23"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button24"
/>
</LinearLayout>
<!-- row 9 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button25"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button26"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button27"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button28"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button29"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button30"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button31"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button32"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button33"
/>
</LinearLayout>
对不起,有什么理由立即投反对票吗?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.android.soundboard.MainActivity"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:paddingTop="2dp"
>
<!-- a lot of buttons -->
<!-- row 1 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/ethan_bradberry"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_ethanBradberry"
/>
<Button
android:text="@string/shut_the_fuck_up"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_stfu"
/>
<Button
android:text="@string/HaHa"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/button_haha"
/>
</LinearLayout>
<!-- row 2 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/oh_now_i_get_it"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_ohNowIGetIt"
/>
<Button
android:text="@string/what_the_fuck"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whatTheFuck"
/>
<Button
android:text="@string/lying"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whyTheFuckULyin"
/>
</LinearLayout>
<!-- row 3 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/why_you_haff_be_mad"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_whyYouHeffBeMad"
/>
<Button
android:text="@string/nigga_you_gay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_niggaYouGay"
/>
<Button
android:text="@string/hit_marker"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_hitMarker"
/>
</LinearLayout>
<!-- row 4 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/its_a_trap"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_itsATrap"
/>
<Button
android:text="@string/shut_up_and_take_my_money"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_shutUpAndTakeMyMoney"
/>
<Button
android:text="@string/_smoke_weed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_smokeWeedEveryDay"
/>
</LinearLayout>
<!-- row 5 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/stop"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_stop"
/>
<Button
android:text="@string/wow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_wow"
/>
<Button
android:text="@string/twenty_one"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_twentyOne"
/>
</LinearLayout>
<!-- row 6 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="@string/Surprise_Mother_fucker"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button_surpriseMotherFucker"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button17"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button18"
/>
</LinearLayout>
<!-- row 7 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button19"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button20"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button21"
/>
</LinearLayout>
<!-- row 8 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button22"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button23"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button24"
/>
</LinearLayout>
<!-- row 9 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button25"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button26"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button27"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button28"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button29"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button30"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1"
>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button31"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button32"
/>
<Button
android:text="New Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/button33"
/>
</LinearLayout>