【LatinIME】默认开启键盘按键声
16lz
2021-01-24
code\packages\inputmethods\LatinIME\java\src\com\android\inputmethod\latin\settings
关于language和input的键盘设置,在inputmethod文件夹下
需要默认开启Sound on keypress
PreferencesSettingsFragment extends SubScreenFragment
在这个界面处理图片中的选项。
addPreferencesFromResource(R.xml.prefs_screen_preferences);
查看xml文件
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" android:title="@string/settings_screen_preferences"> <CheckBoxPreference android:key="auto_cap" android:title="@string/auto_cap" android:summary="@string/auto_cap_summary" android:defaultValue="true" android:persistent="true" /> <CheckBoxPreference android:key="pref_key_use_double_space_period" android:title="@string/use_double_space_period" android:summary="@string/use_double_space_period_summary" android:defaultValue="true" android:persistent="true" /> <CheckBoxPreference android:key="vibrate_on" android:title="@string/vibrate_on_keypress" android:defaultValue="@bool/config_default_vibration_enabled" android:persistent="true" /> <CheckBoxPreference android:key="sound_on" android:title="@string/sound_on_keypress" android:defaultValue="@bool/config_default_sound_enabled" android:persistent="true" /> <CheckBoxPreference android:key="popup_on" android:title="@string/popup_on_keypress" android:defaultValue="@bool/config_default_key_preview_popup" android:persistent="true" /> <CheckBoxPreference android:key="pref_voice_input_key" android:title="@string/voice_input" android:defaultValue="true" android:persistent="true" /></PreferenceScreen>
可以看到开启声音的defaultValue为@bool/config_default_sound_enabled
在config-per-form-factor.xml文件中进行属性的设置
在overlay中对属性进行覆盖
Push路径system/app/LatinIME,之后需要恢复出厂设置
更多相关文章
- Android(安卓)图片平铺效果
- Android(安卓)项目无法生成R文件解决办法
- 基于 eclipse 的 android 工程如何使用 jar 文件
- android中string.xml文件的使用
- android去除标题栏及状态栏
- 【引用】Android(安卓)CTS 测试常见问题
- 在Android中Preferences数据存储的使用
- Android四大组件之activity之间带数据跳转
- 编译Irrlicht On Android(1)