13
Làm cách nào để tạo các phần tử trong bố cục chiếm 50, 25, 10, v.v. của không gian ngang/dọc có sẵn?Phần trăm bố cục phần trăm Android
Làm cách nào để tạo các phần tử trong bố cục chiếm 50, 25, 10, v.v. của không gian ngang/dọc có sẵn?Phần trăm bố cục phần trăm Android
Bạn có thể đạt được điều này với một cái gì đó như thế: (ví đứng đây)
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:weightSum="100">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="60">
</LinearLayout>
</LinearLayout>`