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,之后需要恢复出厂设置

更多相关文章

  1. Android(安卓)图片平铺效果
  2. Android(安卓)项目无法生成R文件解决办法
  3. 基于 eclipse 的 android 工程如何使用 jar 文件
  4. android中string.xml文件的使用
  5. android去除标题栏及状态栏
  6. 【引用】Android(安卓)CTS 测试常见问题
  7. 在Android中Preferences数据存储的使用
  8. Android四大组件之activity之间带数据跳转
  9. 编译Irrlicht On Android(1)

随机推荐

  1. Android使用getIdentifier()方法根据资源
  2. 让你的代码减少三倍!使用kotlin开发Androi
  3. Android(安卓)电量分析之Battery Histori
  4. Android(安卓)6.0运行时权限 (危险权限)
  5. android自定义大小对话框
  6. Android原生(Native)C开发之六:libpng移植
  7. Android+本地记事本(上)------实现登陆注
  8. Android(安卓)PinyinIME Debug 调试
  9. Android(安卓)MatrixCursor的详解
  10. adb shell 查看系统属性(用来判断特殊的操