android8.1- Show virtual keyboard 默认打开

简介: android8.1- Show virtual keyboard 默认打开

修改路径:android-8.1\frameworks\base\packages\SettingsProvider\res\values\defaults.xml

将 :

<bool name="def_show_ime_with_hard_keyboard">false</bool>

改成 :true

  <!-- Default for Settings.Secure.MULTI_PRESS_TIMEOUT -->
    <integer name="def_multi_press_timeout_millis">300</integer>
 
    <!-- Default for Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD -->
 -  <bool name="def_show_ime_with_hard_keyboard">false</bool>
 +  <bool name="def_show_ime_with_hard_keyboard">true</bool>
    <!-- Default for Settings.System.POINTER_SPEED -->
    <integer name="def_pointer_speed">0</integer>
 
    <!-- Default for DTMF tones enabled -->
    <bool name="def_dtmf_tones_enabled">true</bool>
    <!-- Default for UI touch sounds enabled -->

命令:

settings put secure show_ime_with_hard_keyboard 1 打开 
settings put secure show_ime_with_hard_keyboard 0 关闭

frameworks\base\core\java\android\provider\Settings.java

public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
 @Override
    public boolean isChecked() {
    return Settings.Secure.getInt(mContext.getContentResolver(), SHOW_IME_WITH_HARD_KEYBOARD , 1)==1;
    } 
 
    @Override
    public boolean setChecked(boolean isChecked) {
    Settings.Secure.putInt(mContext.getContentResolver(), SHOW_IME_WITH_HARD_KEYBOARD ,
                isChecked ? 1 : 0);
        return true;
    }


目录
相关文章
|
XML Android开发 数据格式
Android Keyboard(自定义输入法)
Keyboard的xml文件配置 软键盘的布局 自定义软键盘工具类 package com.
1986 0
|
6月前
|
开发工具 Android开发 Windows
Android应用] 问题2:ERROR: unknown virtual device name:
Android应用] 问题2:ERROR: unknown virtual device name:
36 2
|
6月前
|
XML 数据格式
android.view.InflateException: Binary XML file line #0: Attempt to invoke virtual
android.view.InflateException: Binary XML file line #0: Attempt to invoke virtual
32 0
|
数据库 Android开发 数据库管理
java.lang.NullPointerException: Attempt to invoke virtual method ‘int android.database.sqlite异常
java.lang.NullPointerException: Attempt to invoke virtual method ‘int android.database.sqlite异常
359 0
|
Kotlin
【错误记录】布局组件加载错误 ( Attempt to invoke virtual method ‘xxx$Callback android.view.Window.getCallback()‘ )
【错误记录】布局组件加载错误 ( Attempt to invoke virtual method ‘xxx$Callback android.view.Window.getCallback()‘ )
315 0
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Intent.getI...
这个报错比较骚,完全只是因为Intent没有写好而已,下面是错误的写法(最好不要在方法外赋值): 进入本活动时即刻报错: 11-10 18:23:24.
6800 0