0
我想設計一個用戶界面,其中我將顯示大量的文本內容,然後按一個按鈕。用戶凸輪向下滾動文本內容,但該按鈕應始終保持可見的屏幕底部。可在安卓市場Vlingo的應用程序使用類似種類的UI作爲展示圖如下:在我的應用程序中實現像用戶界面的Vlingo應用程序?
我試圖把滾動視圖之外的滾動視圖的文本內容和按鈕,但這樣做的按鈕卡茨關閉屏幕。以下是XML佈局我想:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="300dp" >
<TextView
android:id="@+id/txtMsgHd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:text="@string/message"
android:layout_marginRight="10dp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/txtMsg1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/txtMsgHd"
android:text="@string/main_ex_msg1" />
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="@+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btnSpeak"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/speak_now" />
</RelativeLayout>