Android 개발이 처음입니다.
두 개의 테이블 행에 버튼을 몇 개 설정하고 싶습니다. 어떤 도움
테이블 셀이 TableLayout에서 모든 화면 높이를 사용하게하려면 어떻게해야합니까?
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/TableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TableRow>
</TableLayout>
감사 : 그러나 현재 그들은 다음은이 활동의 레이아웃에 대한 XML은 그
의 작은 부분을 사용!
로 다음을 수행합니다. –
여러분의 노력에 감사 드리며 각 버튼 layout_height = "0dp"에 대해 아마 설정해야합니다. 그러면 행이 3 개인 경우 화면 높이의 1/3을 차지하게됩니다. –
미안하지만, 3 열 모두가 화면 크기를 채울 수 있기를 원하십니까? –