你好,我有一个包含多个textView的竖向滚动视图。
在底部我有一个EditText,就像一个聊天应用程序。 我在manifest中设置了android:windowSoftInputMode="adjustPan"。
问题是,当我点击editText时,我的布局会上移,这很好,但键盘会将我的editText裁剪成两半,就像图片中那样。
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="8"
android:background="#CCCCCC" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
//many textView
<TextView
android:id="@+id/text_area"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="#FF0000"
android:layout_marginBottom="15dp"
android:paddingLeft="10dp"
android:textColor="#168191" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:weightSum="10" >
<EditText
android:id="@+id/send_msg"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="8"
android:background="#CCDEDC"
android:paddingLeft="20dp"
android:text="Large Text"
android:textColor="#168191"
android:textSize="15dp" />
<Button
android:id="@+id/send_msg_btn"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="#CCCCCC"
android:text="Send"
android:textColor="#FFFFFF" />
</LinearLayout>