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中ListPreference的使用
  2. Android入门二(五大布局)
  3. [置顶] Android增量更新与CMake构
  4. 自定义视图(组合控件)
  5. 从gpu到chromium compositor(cc)详解andr
  6. Android 5.X Activity过渡动画,以及漂亮的
  7. GridView中实现元素填充剩余空间(自适应)
  8. android基础--获取sdcard的总容量
  9. android studio中的文本替换
  10. 测试Android真机访问电脑主机web项目服务