Android布局:结合LinearLayout和TableLaout

Android布局:结合LinearLayout和TableLaout,android,android-linearlayout,tablelayout,Android,Android Linearlayout,Tablelayout,我希望有一个这样的布局(在横向模式下): -顶部4个等距按钮 -在中间:一个EditText块,它的右边是一个ImageButton -底部是文本视图 以下是我用来实现此布局的xml文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_paren

我希望有一个这样的布局(在横向模式下): -顶部4个等距按钮 -在中间:一个EditText块,它的右边是一个ImageButton -底部是文本视图

以下是我用来实现此布局的xml文件:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:padding="20dip"
>


<TableLayout 
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*">

<TableRow>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/b1"
android:drawablePadding="5sp"
android:text="B1"></Button>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/b2"
android:drawablePadding="5sp"
android:text="B2"></Button>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/b3"
android:drawablePadding="7sp"
android:text="B3"></Button>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/b4"
android:drawablePadding="7sp"
android:text="B4"></Button>

</TableRow>   
</TableLayout> 

<TableLayout 
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*">

<TableRow>

<EditText 
android:id="@+id/entry"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_below="@id/e1"
android:layout_marginLeft="20dp" 
android:layout_marginTop="10dp"  
/>
<ImageButton
android:id="@+id/search2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/i1" 
android:layout_marginTop="10dp" 
/>  

</TableRow>

<TextView
android:id="@+id/t2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="T2"/>

</TableLayout> 

</LinearLayout> 

然而,我所说的是,上面有4个按钮,其余的(第二行和第三行)不在页面上(看不见)。我不知道他们去哪儿了。 我非常感谢你的帮助。 谢谢

TJ

添加

android:orientation="vertical" 

在父线性布局中。

谢谢,这就是问题所在,我感谢您的帮助……因为线性布局的默认方向是水平的。