Settings工程中,Settings -> Language &input 界面所对应的Java代码和Preference布局如下:
<android_root>/packages/apps/Settings/src/com/android/settings/LanguageSettings.java
<android_root>/packages/apps/Settings/res/xml/language_settings.xml
1、Settings -> Language & input -> language
在<android_root>/packages/apps/Settings/res/xml/language_settings.xml中,该模块的Preference布局为:
<PreferenceScreen
android:key="phone_language"
android:title="@string/phone_language" >
<intent android:action="android.intent.action.MAIN"
android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.LocalePicker" />
</PreferenceScreen>
当用户点击 Settings -> Language & input -> language 时,将启动“com.android.settings.LocalePicker”的Activity。其对应的源代码为:
<android_root>/packages/apps/Settings/src/com/android/settings/LocalePicker.java