如果键盘可见,则压缩Android布局
我正在用Xamarin开发一个Android布局。当键盘可见时,布局将被压缩。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:weightSum="20"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="3dp"
android:background="@drawable/faded_div"/>
<LinearLayout
android:id="@+id/div1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:gravity="center_vertical"/>
<ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="16"
android:orientation="vertical"/>
<RelativeLayout
android:id="@+id/div2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2">
<Common.Droid.UI.Controls.NXButton
android:layout_height="44dp"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:text="Aplicar"/>
</RelativeLayout>
</LinearLayout>
目标是让键盘覆盖布局。
当键盘可见时,如何防止屏幕移动?你能帮帮我吗?
转载请注明出处:http://www.intsu.net/article/20230503/1280997.html