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
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
android:orientation="horizontal"
|
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
|
<TextView
|
||||||
style="?android:attr/listSeparatorTextViewStyle"
|
style="?android:attr/listSeparatorTextViewStyle"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
@@ -33,18 +33,6 @@
|
|||||||
android:layout_gravity="left|bottom"
|
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
|
<ProgressBar
|
||||||
android:id="@+id/scanning_progress"
|
android:id="@+id/scanning_progress"
|
||||||
android:text="@string/progress_scanning"
|
android:text="@string/progress_scanning"
|
||||||
|
@@ -271,10 +271,6 @@
|
|||||||
<string name="bluetooth_pairing">Pairing\u2026</string>
|
<string name="bluetooth_pairing">Pairing\u2026</string>
|
||||||
<!--Bluetooth settings screen, summary text for Bluetooth device with no name -->
|
<!--Bluetooth settings screen, summary text for Bluetooth device with no name -->
|
||||||
<string name="bluetooth_device">Unnamed Bluetooth device</string>
|
<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]-->
|
<!--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>
|
<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 -->
|
<!-- Notification ticker text (shown in the status bar) when a Bluetooth device wants to pair with us -->
|
||||||
|
@@ -36,13 +36,10 @@ public class ProgressCategory extends ProgressCategoryBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onBindView(View view) {
|
public void onBindView(View view) {
|
||||||
super.onBindView(view);
|
super.onBindView(view);
|
||||||
final TextView scanning = (TextView) view.findViewById(R.id.scanning_text);
|
|
||||||
final View progressBar = view.findViewById(R.id.scanning_progress);
|
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 ||
|
boolean noDeviceFound = (getPreferenceCount() == 0 ||
|
||||||
(getPreferenceCount() == 1 && getPreference(0) == mNoDeviceFoundPreference));
|
(getPreferenceCount() == 1 && getPreference(0) == mNoDeviceFoundPreference));
|
||||||
scanning.setVisibility(noDeviceFound ? View.GONE : View.VISIBLE);
|
|
||||||
progressBar.setVisibility(mProgress ? View.VISIBLE : View.GONE);
|
progressBar.setVisibility(mProgress ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
if (mProgress || !noDeviceFound) {
|
if (mProgress || !noDeviceFound) {
|
||||||
|
Reference in New Issue
Block a user