Android 安卓选择性调整软键盘上的元素大小
我对此布局有问题:Android 安卓选择性调整软键盘上的元素大小,android,android-softkeyboard,Android,Android Softkeyboard,我对此布局有问题: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/my_root4" android:layout_width="match_parent"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_root4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".Viewer4Activity" >
<com.my.mypager
android:id="@+id/myPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:isScrollContainer="false" >
</com.my.mypager>
<com.my.mypanel
android:id="@+id/myPanelResults"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="vertical"
android:visibility="gone" >
<GridView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myResults"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:isScrollContainer="true"
android:numColumns="2"
android:stretchMode="columnWidth" >
</GridView>
</com.my.mypanel>
</RelativeLayout>
活动开始时,myPager
以全屏模式显示图像,并且myPanel
被隐藏(visibility=“gone”
)
此时,我显示了软键盘和myPager
container mantains维度中的图像;我已经设置了android:isScrollContainer=“false”
当我将myPanel
的可见性设置为visible via code时,面板的大小正确,不会与键盘重叠,但图像的大小也会调整。
如何使图像保持其大小
有什么建议吗?谢谢您在清单中的活动标签中尝试过android:WindowsofInputMode=“adjustPan”吗?谢谢您的回答。我已经测试了
android:windowSoftInputMode=“adjustPan”
,但是在这种情况下,myPanel
中的标签android:isScrollContainer=“true”
被忽略,键盘与面板重叠。