最近遇到個(gè)問題溜宽,就是軟鍵盤彈出時(shí)汛蝙,后面的界面總是上移剪廉,網(wǎng)上查了好多文章娃循,基本上把a(bǔ)ndroid:windowSoftInputMode中列的屬性都試了一遍,都不生效斗蒋,最后去看了下類常量捌斧,才發(fā)現(xiàn)有個(gè)adjustNothing的常量,設(shè)置到AndroidManifest.xml中對應(yīng)<activity>標(biāo)簽下就解決了吹泡。
<activity android:name=".WhhTestActivity"
android:windowSoftInputMode="adjustNothing">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Android軟件盤屬性可以去看這篇文章Android中windowSoftInputMode的配置與軟鍵盤狀態(tài)