我试图用相对布局在UI应该在哪里寻找这样创建UI:UI的相对布局
- 在屏幕上,我有一个TextView紧接着又TextView的
- 顶部
- 其次滚动视图在哪里我必须显示 可滚动格式的文本
- 最后我有一个imageview。
我该如何做到这一点。 我尝试过使用相对和线性布局的组合,但元素会重叠。任何人有任何建议如何进行?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/background_main" android:id="@+id/g_description">
<TextView android:id="@+id/titleBar" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="@drawable/header"
android:layout_alignParentTop="true" android:gravity="center"
android:text="@string/aboutus" android:textAppearance="? android:attr/textAppearanceLarge"
android:textStyle="bold" />
<TextView android:id="@+id/wd_name"
android:layout_width="fill_parent" android:layout_below="@id/titleBar"
android:layout_height="wrap_content" android:textStyle="bold"
android:textColor="#FFFFFF" android:textSize="18dip"
android:background="@drawable/background_main" android:gravity="center" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrolltext" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_below="@id/wd_name"
android:padding="5dip">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/wd_description"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textSize="14dip" android:textColor="#FFFFFF">
</TextView>
</LinearLayout>
</ScrollView>
<ImageView android:id="@+id/bottomBar" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:src="@drawable/bottom_bar"
android:layout_alignParentBottom="true" />
发布您正在尝试的xml代码。 –