Tweak bluetooth text alignment
1. Remove the placeholder summary so it won't show blank summary 2. Update settings_entity_header to make text center_vertical, so it could align with the icon. Bug: 71742145 Test: Screenshot Change-Id: I185114a4e0c8d996f218075a8633e802fabf3c66
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -57,8 +58,7 @@
|
|||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale" />
|
||||||
android:paddingTop="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/install_type"
|
android:id="@+id/install_type"
|
||||||
|
@@ -176,7 +176,6 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback {
|
|||||||
new BluetoothDevicePreference(mPrefContext, cachedDevice,
|
new BluetoothDevicePreference(mPrefContext, cachedDevice,
|
||||||
mShowDeviceWithoutNames);
|
mShowDeviceWithoutNames);
|
||||||
btPreference.setOnGearClickListener(mDeviceProfilesListener);
|
btPreference.setOnGearClickListener(mDeviceProfilesListener);
|
||||||
btPreference.setSummary(R.string.summary_placeholder);
|
|
||||||
mPreferenceMap.put(device, btPreference);
|
mPreferenceMap.put(device, btPreference);
|
||||||
mDevicePreferenceCallback.onDeviceAdded(btPreference);
|
mDevicePreferenceCallback.onDeviceAdded(btPreference);
|
||||||
}
|
}
|
||||||
|
@@ -95,8 +95,6 @@ public class BluetoothDeviceUpdaterTest {
|
|||||||
|
|
||||||
final Preference preference = mBluetoothDeviceUpdater.mPreferenceMap.get(mBluetoothDevice);
|
final Preference preference = mBluetoothDeviceUpdater.mPreferenceMap.get(mBluetoothDevice);
|
||||||
assertThat(preference).isNotNull();
|
assertThat(preference).isNotNull();
|
||||||
assertThat(preference.getSummary()).isEqualTo(
|
|
||||||
mContext.getString(R.string.summary_placeholder));
|
|
||||||
verify(mDevicePreferenceCallback).onDeviceAdded(preference);
|
verify(mDevicePreferenceCallback).onDeviceAdded(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user