Remove "Searching/Tap To Pair" text from Bluetooth Settings.
The second text field next to "Available devices" in the Bluetooth
Settings device list creates a cluttered heading that wraps to multiple
lines in some locales. It's unnecessary because there's a graphical
progress spinner when searching for devices, and "Touch to pair" is
easily discoverable. Remove the second text field and the "Searching"
and "Touch to pair" string resources.
Bug: 5496221
Change-Id: I7b71222415152014426cf54fc112fe5379d350dc
diff --git a/res/layout/preference_progress_category.xml b/res/layout/preference_progress_category.xml
index 0a860af..ad782f2 100644
--- a/res/layout/preference_progress_category.xml
+++ b/res/layout/preference_progress_category.xml
@@ -21,7 +21,7 @@
android:orientation="horizontal"
>
- <!-- This and the other text view have the style of the list separator text view without the background and padding -->
+ <!-- This text view has the style of the list separator text view without the background and padding. -->
<TextView
style="?android:attr/listSeparatorTextViewStyle"
android:background="@null"
@@ -33,18 +33,6 @@
android:layout_gravity="left|bottom"
/>
- <TextView
- style="?android:attr/listSeparatorTextViewStyle"
- android:background="@null"
- android:paddingLeft="0dip"
- android:id="@+id/scanning_text"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="right|bottom"
- android:text="@string/progress_scanning"
- />
-
<ProgressBar
android:id="@+id/scanning_progress"
android:text="@string/progress_scanning"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3270c19..aaf51c5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -271,10 +271,6 @@
<string name="bluetooth_pairing">Pairing\u2026</string>
<!--Bluetooth settings screen, summary text for Bluetooth device with no name -->
<string name="bluetooth_device">Unnamed Bluetooth device</string>
- <!--Bluetooth settings screen, text that appears in heading bar when scanning for devices -->
- <string name="progress_scanning">Searching</string>
- <!--Bluetooth settings screen, text that appears in heading bar when scanning for devices is finished, indicating that user can tap on a device to pair with it [CHAR LIMIT=20]-->
- <string name="progress_tap_to_pair">Touch to pair</string>
<!--Bluetooth settings screen, text that appears when scanning for devices is finished and no nearby bluetooth device was found [CHAR LIMIT=40]-->
<string name="bluetooth_no_devices_found">No nearby Bluetooth devices were found.</string>
<!-- Notification ticker text (shown in the status bar) when a Bluetooth device wants to pair with us -->
diff --git a/src/com/android/settings/ProgressCategory.java b/src/com/android/settings/ProgressCategory.java
index c1b25d8..625aa59 100644
--- a/src/com/android/settings/ProgressCategory.java
+++ b/src/com/android/settings/ProgressCategory.java
@@ -36,13 +36,10 @@
@Override
public void onBindView(View view) {
super.onBindView(view);
- final TextView scanning = (TextView) view.findViewById(R.id.scanning_text);
final View progressBar = view.findViewById(R.id.scanning_progress);
- scanning.setText(mProgress ? R.string.progress_scanning : R.string.progress_tap_to_pair);
boolean noDeviceFound = (getPreferenceCount() == 0 ||
(getPreferenceCount() == 1 && getPreference(0) == mNoDeviceFoundPreference));
- scanning.setVisibility(noDeviceFound ? View.GONE : View.VISIBLE);
progressBar.setVisibility(mProgress ? View.VISIBLE : View.GONE);
if (mProgress || !noDeviceFound) {