Tag: android keyboard

android:windowSoftInputMode =“adjustResize”没有任何区别?

我有一个使用这个布局的人造对话框: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/containerPageConatiner"> <FrameLayout android:id="@+id/dialogHolder" android:layout_height="wrap_content" android:layout_width="wrap_content" android:padding="15dp" android:layout_gravity="center" android:background="@drawable/panel_picture_frame_bg_focus_blue"/> </FrameLayout> 我根据正在打开的对话框在<FrameLayout>放置一个片段 – 控制Dialog的活动如下所示: <activity android:label="@string/app_name" android:name=".activity.DialogActivity" android:theme="@style/CustomTheme.Screen.Transparent" android:windowSoftInputMode="adjustResize"> 不幸的是,当你点击对话框中的编辑文本时,不会发生大小调整。 windowSoftInputMode从字面上看没有区别,因为function与平移模式相同。 文档说:“这当然只适用于具有可调整空间的可调整区域的应用程序”,但并没有告诉你“可resize的区域”是什么意思,使我觉得在某种程度上,有一个可调整的区域? 如果有人知道什么可以帮助我吗? 编辑 围绕这样的对话不会改变任何事情: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/containerPageConatiner" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <View android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" /> <FrameLayout android:id="@+id/dialogHolder" android:layout_height="wrap_content" android:layout_width="wrap_content" android:padding="15dp" android:layout_gravity="center" android:background="@drawable/panel_picture_frame_bg_focus_blue"/> <View android:layout_width="0dp" […]