Dynamically populate a list of available recognition services in voice settings,

only showing the option to choose if there is more than one to choose from. Use
the new settingsActivity meta-data to target the appropriate settings activity
for the chosen recognizer.
This commit is contained in:
Mike LeBeau
2010-02-11 22:57:12 -08:00
parent eadeebd1df
commit 766a19b278
3 changed files with 184 additions and 36 deletions

View File

@@ -2073,6 +2073,14 @@ found in the list of installed applications.</string>
<string name="voice_search_settings_title">Voice search</string>
<!-- Title of keyboard settings list item within voice input/output settings -->
<string name="keyboard_settings_title">Android keyboard</string>
<!-- Title for the 'voice input' category of voice input/output settings -->
<string name="voice_input_category">Voice input</string>
<!-- Title for the 'voice output' category of voice input/output settings -->
<string name="voice_output_category">Voice output</string>
<!-- Title for the voice recognizer setting in voice input/output settings -->
<string name="recognizer_title">Voice recognizer</string>
<!-- Title for the link to settings for the chosen voice recognizer in voice input/output settings -->
<string name="recognizer_settings_title">Voice recognizer settings</string>
<!-- Text-To-Speech (TTS) settings --><skip />
<!-- Title of setting on main settings screen. This item will take the user to the screen to tweak settings related to the text-to-speech functionality -->

View File

@@ -17,25 +17,28 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/voice_input_output_settings_title"
android:key="parent">
<PreferenceCategory android:key="voice_input_category"
android:title="@string/voice_input_category" />
<PreferenceScreen android:key="voice_search_settings"
android:title="@string/voice_search_settings_title">
<intent android:action="android.speech.action.VOICE_SEARCH_SETTINGS"/>
</PreferenceScreen>
<!-- TODO: Link to a specific voice settings activity within LatinIME when it exists. -->
<PreferenceScreen android:key="keyboard_settings"
android:title="@string/keyboard_settings_title">
<intent android:action="android.intent.action.MAIN"
android:targetPackage="com.android.inputmethod.latin"
android:targetClass="com.android.inputmethod.latin.LatinIMESettings" />
</PreferenceScreen>
<!-- entries, entryValues, and defaultValue will be populated programmatically. -->
<ListPreference
android:key="recognizer"
android:title="@string/recognizer_title"
android:dialogTitle="@string/recognizer_title" />
<!-- An intent for this preference will be populated programmatically. -->
<PreferenceScreen android:key="recognizer_settings"
android:title="@string/recognizer_settings_title" />
<PreferenceCategory android:key="voice_output_category"
android:title="@string/voice_output_category" />
<PreferenceScreen android:key="tts_settings"
android:title="@string/tts_settings_title">
<intent android:action="android.intent.action.MAIN"
android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.TextToSpeechSettings" />
</PreferenceScreen>
</PreferenceScreen>