RelativeLayout à l'intérieur de LinearLayout?

Je me demandais ce que je fais de mal ici, pourquoi ne entourant ces boutons dans un RelativeLayout causer une erreur? Je n'ai pas édité mises en page beaucoup, je ne peux pas simplement s'en tenir à un Parent ou d'un Linéaire de mise en page comme ça?

Si je ne suis pas d'entourer les boutons dans une mise en page qu'ils apparaissent les uns en dessous des autres, je suis juste essayer d'expérience en avoir les uns à côté des autres horizontalement.

Je pense que la façon dont je l'ai fait toute la mise en page est mauvais parce que verticalement, il semble tout à fait écrasé.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/MainLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout android:id="@+id/topButtons" 
android:layout_margin="4dip"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/deviceConnect"
android:layout_margin="8dip"
android:layout_weight="3"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="Connect2"/>
<LinearLayout android:orientation="vertical"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal"
android:layout_margin="8dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView android:text="Connected Adapter:"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/deviceSpinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"/>
<TextView android:id="@+id/currentSettings" 
android:layout_marginLeft="8dip"
android:text="Current Settings: Not Connected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal"
android:layout_margin="8dip"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="Baud:"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/baudSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_margin="8dip"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="Data:"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/dataSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_margin="8dip"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="Parity:"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/paritySpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"/>
</LinearLayout>
<LinearLayout android:orientation="horizontal"
android:layout_margin="8dip"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="Stop:"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner android:id="@+id/stopSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button android:id="@+id/updateSettings"
android:layout_margin="8dip"
android:layout_weight="3"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="Update\nSettings"/>
</LinearLayout>
<RelativeLayout>
<Button android:id="@+id/Command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Command"/> 
<Button android:id="@+id/Command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Command"/> 
<Button android:id="@+id/Command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Command"/> 
<Button android:id="@+id/Command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Command"/> 
<Button android:id="@+id/Command"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Command"/> 
</RelativeLayout>
<jackpal.androidterm.emulatorview.EmulatorView
android:id="@+id/emulatorView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="true"
android:focusableInTouchMode="true"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="horizontal" >
<EditText
android:id="@+id/term_entry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:imeOptions="actionNone|flagNoExtractUi"
android:inputType="text|textImeMultiLine" />
<Button
android:id="@+id/term_entry_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/entry_send" />
</LinearLayout>

Quelle est la question.?

OriginalL'auteur Paul | 2013-01-08