嗨我有FrameLayout
并且想在此布局中添加two buttons (or more)
。
第一个按钮显示,但是当添加第二个按钮时,似乎将it beneath the first button
。我试过margin top gravity
和其他几个,但似乎无法显示第一个下面的按钮。如何在framelayout中显示彼此之下的按钮?
这里是我的XML文件
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/logo1">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" >
<Button
android:id="@+id/Distancecalc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Distance Calculator" />
<Button
android:id="@+id/Distance"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Distance Calculator" />
</FrameLayout>
</LinearLayout>
</TabHost>
谁能请帮助?
十分感谢!有用! – Allrounder 2014-11-14 13:11:18