Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdc53383 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Implement the new TTS settings UI."

parents 1a843346 0cfbb0f1
Loading
Loading
Loading
Loading
+89 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical">
    <LinearLayout
        android:id="@+id/tts_engine_pref"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:clickable="true"
        android:focusable="true"
        android:background="?android:attr/selectableItemBackground">
        <RadioButton
            android:id="@+id/tts_engine_radiobutton"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginLeft="10dip"
            android:layout_marginRight="4dip"
            android:layout_gravity="center_vertical"
            android:orientation="vertical"
            android:clickable="true" />
        <RelativeLayout
            android:id="@+id/tts_engine_pref_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="6dip"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="6dip"
            android:layout_weight="1">
            <TextView
                android:id="@android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"/>
            <TextView
                android:id="@android:id/summary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@android:id/title"
                android:layout_alignLeft="@android:id/title"
                android:visibility="gone"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textSize="13sp"
                android:textColor="?android:attr/textColorSecondary"
                android:maxLines="4" />
        </RelativeLayout>
    </LinearLayout>
    <View
        android:layout_width="2dip"
        android:layout_height="match_parent"
        android:layout_marginTop="5dip"
        android:layout_marginBottom="5dip"
        android:background="@android:drawable/divider_horizontal_dark" />
    <ImageView
        android:id="@+id/tts_engine_settings"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:paddingLeft="15dip"
        android:paddingRight="?android:attr/scrollbarSize"
        android:src="@drawable/ic_sysbar_quicksettings"
        android:contentDescription="@string/tts_engine_settings_button"
        android:layout_gravity="center"
        android:clickable="true"
        android:focusable="true"
        android:background="?android:attr/selectableItemBackground" />
</LinearLayout>
+7 −27
Original line number Diff line number Diff line
@@ -201,40 +201,20 @@
        <item>150</item>
    </string-array>

    <!-- Default language choices -->
    <string-array name="tts_lang_entries">
        <item>American English</item>
        <item>British English</item>
        <item>French</item>
        <item>German</item>
        <item>Italian</item>
        <item>Spanish</item>
    </string-array>
    <!-- Do not translate. -->
    <string-array name="tts_lang_values">
        <item>eng-USA</item>
        <item>eng-GBR</item>
        <item>fra-FRA</item>
        <item>deu-DEU</item>
        <item>ita-ITA</item>
        <item>spa-ESP</item>
    </string-array>
    <!-- Do not translate. -->
    <string-array name="tts_demo_strings">
        <item>This is an example of speech synthesis in English.</item>
    <!-- Do not translate. -->
    <string-array name="tts_demo_strings" translatable="false">
        <item>This is an example of speech synthesis in English.</item>
        <item>Voici un échantillon de synthèse vocale en français.</item>
        <item>Dies ist ein Beispiel für Sprachsynthese in Deutsch.</item>
        <item>Questo è un esempio di sintesi vocale in italiano.</item>
        <item>Este es un ejemplo de síntesis de voz en español.</item>
    </string-array>
    <!-- Do not translate. -->
    <string-array name="tts_engine_entries">
        <item>Pico TTS</item>
    </string-array>
    <!-- Do not translate. -->
    <string-array name="tts_engine_values">
        <item>com.svox.pico</item>
    <string-array name="tts_demo_string_langs" translatable="false">
        <item>eng</item>
        <item>fra</item>
        <item>deu</item>
        <item>ita</item>
        <item>esp</item>
    </string-array>


+9 −2
Original line number Diff line number Diff line
@@ -2980,8 +2980,6 @@ found in the list of installed applications.</string>
    <string name="tts_install_data_summary">Install the voice data required for speech synthesis</string>
    <!-- On main TTS Settings screen, summary for when required speech synthesis data alrady installed on SD card -->
    <string name="tts_data_installed_summary">Voices required for speech synthesis already properly installed</string>
    <!-- Text spoken by the TTS engine for demonstration purposes -->
    <string name="tts_demo">This is an example of speech synthesis.</string>
    <!-- Text spoken by the TTS engine when TTS settings (other than language) have been changed -->
    <string name="tts_settings_changed_demo">Your settings have changed. This is an example of how they sound.</string>
    <!-- Error screen when a selected TTS engine can't run because it's missing components -->
@@ -3028,6 +3026,15 @@ found in the list of installed applications.</string>
         to warn the user that this engine cannot be used before the checkbox for that engine
         in TTS settings is checked. -->
    <string name="tts_notif_engine_install_message">Enable new engine before use</string>
    <!-- [CHAR LIMIT=150] Text for screen readers / accessibility programs for
         the image that launches the TTS engine settings when clicked. -->
    <string name="tts_engine_settings_button">Launch engine settings</string>
    <!-- [CHAR LIMIT=50] The text for the settings section that users to set a
         preferred text to speech engine -->
    <string name="tts_engine_preference_section_title">Preferred engine</string>
    <!-- [CHAR LIMIT=50] Title of the settings section that displays general preferences
         that are applicable to all engines, such as the speech rate -->
    <string name="tts_general_section_title">General</string>

    <!-- Power Control Widget -->
    <string name="gadget_title">Power Control</string>
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@
            android:title="@string/voice_output_category" >

        <PreferenceScreen android:key="tts_settings"
                android:fragment="com.android.settings.TextToSpeechSettings"
                android:fragment="com.android.settings.tts.TextToSpeechSettings"
                android:title="@string/tts_settings_title" />
    </PreferenceCategory>

+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="">
    <ListPreference
        android:key="tts_default_lang"
        android:title="@string/tts_default_lang_title"
        android:summary="@string/tts_default_lang_summary"
        android:persistent="false" />

    <Preference
        android:key="tts_engine_settings"
        android:persistent="false"
        android:title="@string/tts_engine_settings_title" />

    <Preference
        android:key="tts_install_data"
        android:persistent="false"
        android:title="@string/tts_install_data_title"
        android:summary="@string/tts_install_data_summary" />
</PreferenceScreen>
Loading