我在新的Android KitKat(4.4)和windowSoftInputMode="adjustResize"
中的半透明操作欄/導航欄存在問題。windowSoftInputMode =「adjustResize」不支持半透明動作/導航欄
通常將InputMode更改爲adjustResize,應用程序應該在顯示鍵盤時調整自身的大小......但在這裏它不會!如果我刪除透明效果的行,調整大小正在工作。
因此,如果鍵盤可見,我的ListView是在它下面,我無法訪問最後幾項。 (僅通過隱藏手動鍵盤)
的AndroidManifest.xml用於固定
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="XYZ"
android:versionCode="23"
android:versionName="0.1" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.XYZStyle" >
<activity
android:name="XYZ"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
值-V19/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.XYZStyle" parent="@style/Theme.AppCompat.Light">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>
fragment.xml之
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listView_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:divider="@null"
android:dividerHeight="0dp"
android:drawSelectorOnTop="true"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
android:paddingBottom="@dimen/navigationbar__height" >
</ListView>
</RelativeLayout>
任何想法這個?
的可能重複[機器人:windowSoftInputMode = 「adjustResize」 沒有任何差別(http://stackoverflow.com/問題/ 8398102/androidwindowsoftinputmode-adjustresize - 犯規 - 化妝任何差) – mikepenz