我遇到了键盘问题。当键盘消失后,它占用的空间仍然保持空白,而其余布局不会调整。
正常屏幕: 有键盘: 键盘被取消: 我从未见过这种情况,因此我甚至不确定从哪里开始查找。这在4.2.2和5.1上都会发生。
另一个重要信息是这是一个自定义LinearLayout,包含所有内容。也许与此有关。如果需要,我可以上传任何代码。
这是主要的布局文件外壳。
这是我的清单文件。
正常屏幕: 有键盘: 键盘被取消: 我从未见过这种情况,因此我甚至不确定从哪里开始查找。这在4.2.2和5.1上都会发生。
另一个重要信息是这是一个自定义LinearLayout,包含所有内容。也许与此有关。如果需要,我可以上传任何代码。
这是主要的布局文件外壳。
<com.edgetechlabs.app_v2.MasterLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Menu (Drawer)-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:visibility="visible"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="@+id/activity_main_menu_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/drawer_background"
android:cacheColorHint="#00000000" >
</ScrollView>
</LinearLayout>
<!-- Fragment Holder -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- This is where fragment will show up -->
<FrameLayout
android:id="@+id/fragment_master"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
</LinearLayout>
这是我的清单文件。
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MasterActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
android:windowSoftInputMode="adjustResize"
,这将影响所有布局的布局调整,但会对半透明/透明的某些内容产生问题... - ecle