Button btnClose
을 UI 하단에 위치 시키려면 컨트롤을 추가해야합니다. <TextView android:id="@+id/tvOnlyTake"
... android:layout_weight="1"
좋은 방법이라고 생각하지 않습니다. 몇 가지 제안을 해주시겠습니까? 감사! 내가 android:id="@+id/tvOnlyTake"
를 이동하고 버튼 btnClose에 대한 android:layout_weight="1"
을 설정하면Button을 UI 하단에 위치 시키려면 어떻게해야합니까?
BTW,이 버튼은 하단 공간에 채우고 테이블 레이아웃 사용 프레임 레이아웃이 예 당신을 참조하여 큰 버튼
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/border_ui" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<TextView
android:id="@+id/tvPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
</TableRow>
<TextView
android:id="@+id/tvOnlyTake"
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="1"
android:text="" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" >
<Button
android:id="@+id/btnClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/myTextAppearance"
android:text="@string/myreturn" />
</LinearLayout>
</TableLayout>
안드로이드 : layout_alignParentBottom = "true"로 – KOTIOS
나는의 일부 추측 수 있듯이 레이아웃 코드 - 기본 (루트) 레이아웃은 무엇입니까? – Robert
'RelativeLayout'을보세요. 하나의'RelativeLayout'을 사용하고'TableRow'와'LinearLayout'을 완전히 제거 할 수 있어야합니다. – Tigger