summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/tts
diff options
context:
space:
mode:
authorshwetachahar <shwetachahar@google.com>2016-04-29 17:14:03 +0100
committershwetachahar <shwetachahar@google.com>2016-05-17 13:56:57 +0100
commit43d93289ba172cb52f3c5a47421cd7c0c91f3ffa (patch)
tree1965e198199e847ec54c6beb27f873392e77d9a7 /src/com/android/settings/tts
parent15c1bb48c3da3404a775c7101e3559772aa37d6e (diff)
downloadpackages_apps_Settings-43d93289ba172cb52f3c5a47421cd7c0c91f3ffa.tar.gz
packages_apps_Settings-43d93289ba172cb52f3c5a47421cd7c0c91f3ffa.tar.bz2
packages_apps_Settings-43d93289ba172cb52f3c5a47421cd7c0c91f3ffa.zip
Modify the TTS engine preference UI so that the radio button and the TTS
engine name are a single focusable element. Bug: 27136946 Change-Id: I502634e0942b9fe30e290ce9de6ba293f33bf863
Diffstat (limited to 'src/com/android/settings/tts')
-rw-r--r--src/com/android/settings/tts/TtsEnginePreference.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/com/android/settings/tts/TtsEnginePreference.java b/src/com/android/settings/tts/TtsEnginePreference.java
index 35ecf86dd1..385b8617ba 100644
--- a/src/com/android/settings/tts/TtsEnginePreference.java
+++ b/src/com/android/settings/tts/TtsEnginePreference.java
@@ -106,7 +106,7 @@ public class TtsEnginePreference extends Preference {
setKey(mEngineInfo.name);
setTitle(mEngineInfo.label);
}
-
+
@Override
public void onBindViewHolder(PreferenceViewHolder view) {
super.onBindViewHolder(view);
@@ -118,6 +118,7 @@ public class TtsEnginePreference extends Preference {
final RadioButton rb = (RadioButton) view.findViewById(R.id.tts_engine_radiobutton);
rb.setOnCheckedChangeListener(mRadioChangeListener);
+ rb.setText(mEngineInfo.label);
boolean isChecked = getKey().equals(mSharedState.getCurrentKey());
if (isChecked) {
@@ -130,14 +131,6 @@ public class TtsEnginePreference extends Preference {
mRadioButton = rb;
- View textLayout = view.findViewById(R.id.tts_engine_pref_text);
- textLayout.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- onRadioButtonClicked(rb, !rb.isChecked());
- }
- });
-
mSettingsIcon = view.findViewById(R.id.tts_engine_settings);
// Will be enabled only the engine has passed the voice check, and
// is currently enabled.