Well, I'm programming android, and building layouts for my app. My problem: I can not make the layout of my app fit vertically to different devices.
My xml code:
'' '
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="50dp" >
<ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ToggleButton
android:id="@+id/toggleButton6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
</TableRow>
<TableRow
android:id="@+id/tableRow4"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ToggleButton
android:id="@+id/toggleButton11"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton12"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton14"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
<ToggleButton
android:id="@+id/toggleButton15"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="ToggleButton" />
</TableRow>
<TableRow
android:id="@+id/tableRow5"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Button" />
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="TextView" />
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
</TableRow>
'' '
I want my buttons to increase in size on their own when the screen increases, horizontally this already happens due to the stretchColumns tablelayout but how do I do that in vertical tbm?
Thank you!