Ảnh: http://img838.imageshack.us/img838/1402/picse.pngLàm cách nào để đạt được kết quả sau bằng cách sử dụng RelativeLayout?
Làm cách nào để bố cục trong Pic. 2 chỉ sử dụng RelativeLayout ONLY. Dưới đây là bố cục xml của ảnh chụp màn hình đầu tiên.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/timer_textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="10dip"
android:textSize="30sp"
android:layout_alignParentTop="true"
android:text="@string/timer_start" />
<ListView
android:id="@+id/questions_listview"
android:layout_below="@id/timer_textview"
android:layout_width="wrap_content"
android:layout_height="fill_parent" />
<Button android:id="@+id/true_btn"
android:text="@string/true_option"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="@+id/false_btn"
android:text="@string/false_option"
android:layout_toRightOf="@id/true_btn"
android:layout_alignBaseline="@id/true_btn"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
'android: layout_weight' không có nghĩa trong' RelativeLayout'. Tôi không biết cách để thực hiện những gì bạn tìm kiếm bằng cách sử dụng một 'RelativeLayout' duy nhất, xin lỗi. – CommonsWare