我有一個非常簡單的佈局,我設計實現了屏幕頂部的工具欄。我在這裏使用權重來適應所有設備。像11一樣給工具欄,89給內容主體。無論如何,這將適合所有屏幕。佈局正在推高
問題:
我有內容主體內,並且滾動視圖我有樣4個EditText
視圖內滾動視圖。當我點擊最後一個EditText
鍵入它時,我的佈局被特別推上了我必須使用重量的工具欄。 現在請不要告訴我不要使用重量,只是告訴我如何解決它。我怎樣才能停止佈局推升?就像Gmail客戶端一樣。當你輸入的時候,標題不會被推上去,在那裏你可以保存或者發送郵件。
main.xml中:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#ffe234"
android:layout_weight="11" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:text="Memories" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="89" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:minLines="6"
android:ems="10" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
還是一樣:-( –