这样订购布局,您将可以在键盘上方放置按钮
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/button_next"
android:background="#0ff"
>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="250dp"
android:hint="Hint"
/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ABC"
android:textSize="50sp"
/>
android:id="@+id/button_next"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:text="Button Next"
/>
在Android清单中
...
>
android:windowSoftInputMode="adjustResize"
>
请注意,除了ViewGroup以外,您还可以使用其他ViewGroup(例如LinearLayout),重量为CordinatorLayout,...