我試圖用相對佈局在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代碼。 –