在我的应用程序中, 我想在屏幕顶部以屏幕宽度显示一个TextView。接下来想要在TextView下面显示图形视图。接下来在图形视图下方显示一个文本视图。在Android中显示TextView屏幕底部
我用下面的xml代码。在我的代码TextView不能显示在屏幕底部。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:background="#FF8A11"
android:padding="8dip"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<com.game.viewdot.ViewDot
android:id="@+id/DrawView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom"
android:layout_gravity="bottom"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Another Text View"
android:background="#FF8A11"
android:padding="8dip"
android:gravity="bottom"
android:layout_gravity="bottom"
/>
</LinearLayout>
我希望把这个代码让我的结果是什么修改??????
你为什么不使用'RelativeLayout'?再次编辑布局,以便它可以正常浏览 – 2011-04-21 12:23:55