Всё никак не могу разобраться с расположением экранных компонентов.
Обычно всё делаю в Relative, но вот сейчас потребовалось сделать так: форма редактирования во весь экран, а под ней две кнопки (каждая весом по 0.5).
Соответственно, я не придумал ничего лучше, чем сделать форму Relative, а под ней Linear с двумя кнопками...но че-то не получается =(
Подскажите, пожалуйста, где ошибка?
Код: Выделить всё
<?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"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/ll1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/ed_btn_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save" />
<Button
android:id="@+id/ed_btn_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
<EditText
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_above="@id/ll1"
android:ems="10"
android:inputType="textCapWords" >
<requestFocus />
</EditText>
</RelativeLayout>