android 開發收銀系統,彈出鍵盤固定界面UI的方法

在使用 android:windowSoftInputMode="adjustPan" 和getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);還不起作用時,

看一下SearchView是否添加

android:imeOptions="flagNoExtractUi"
<activity android:name="com.shangdatong.cash.view.activty.MainActivity"
    android:windowSoftInputMode="adjustPan"
    android:launchMode="singleTop">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

        .....

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章