Vertically center notification priority labels.

Fix: 161297560
Test: manual
Change-Id: Idd4600a48e1ba50b9a861c9989de9baeb1493eab
This commit is contained in:
Mariia Sandrikova
2020-09-09 15:18:58 +01:00
parent c3bd801a89
commit b74bf962cc

View File

@@ -31,27 +31,32 @@
android:padding="@dimen/notification_importance_button_padding" android:padding="@dimen/notification_importance_button_padding"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<ImageView <LinearLayout
android:id="@+id/icon" android:id="@+id/icon_label_container"
android:src="@drawable/ic_important_outline" android:gravity="center_vertical"
android:background="@android:color/transparent"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:orientation="horizontal">
android:maxLines="1" <ImageView
android:clickable="false" android:id="@+id/icon"
android:focusable="false" android:src="@drawable/ic_important_outline"
android:layout_toEndOf="@id/icon" android:background="@android:color/transparent"
android:layout_marginStart="@dimen/notification_importance_drawable_padding" android:layout_width="wrap_content"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected" android:layout_height="wrap_content"
android:text="@string/notification_priority_title"/> android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:clickable="false"
android:focusable="false"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/notification_priority_title"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/summary" android:id="@+id/summary"
android:paddingTop="@dimen/notification_importance_button_padding" android:paddingTop="@dimen/notification_importance_button_padding"
@@ -62,7 +67,6 @@
android:focusable="false" android:focusable="false"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="4" android:maxLines="4"
android:layout_below="@id/icon"
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail" android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
android:visibility="gone" /> android:visibility="gone" />
</com.android.settings.notification.NotificationButtonRelativeLayout> </com.android.settings.notification.NotificationButtonRelativeLayout>
@@ -75,27 +79,32 @@
android:layout_marginTop="@dimen/notification_importance_button_separation" android:layout_marginTop="@dimen/notification_importance_button_separation"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<ImageView <LinearLayout
android:id="@+id/icon" android:id="@+id/icon_label_container"
android:src="@drawable/ic_notifications_alert" android:gravity="center_vertical"
android:background="@android:color/transparent"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:orientation="horizontal">
android:maxLines="1" <ImageView
android:clickable="false" android:id="@+id/icon"
android:focusable="false" android:src="@drawable/ic_notifications_alert"
android:layout_toEndOf="@id/icon" android:background="@android:color/transparent"
android:layout_marginStart="@dimen/notification_importance_drawable_padding" android:layout_width="wrap_content"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected" android:layout_height="wrap_content"
android:text="@string/notification_alert_title"/> android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:clickable="false"
android:focusable="false"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/notification_alert_title"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/summary" android:id="@+id/summary"
android:paddingTop="@dimen/notification_importance_button_padding" android:paddingTop="@dimen/notification_importance_button_padding"
@@ -106,7 +115,7 @@
android:focusable="false" android:focusable="false"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:layout_below="@id/icon" android:layout_below="@id/icon_label_container"
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail" android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
android:visibility="gone" /> android:visibility="gone" />
</com.android.settings.notification.NotificationButtonRelativeLayout> </com.android.settings.notification.NotificationButtonRelativeLayout>
@@ -119,27 +128,32 @@
android:layout_marginTop="@dimen/notification_importance_button_separation" android:layout_marginTop="@dimen/notification_importance_button_separation"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<ImageView <LinearLayout
android:id="@+id/icon" android:id="@+id/icon_label_container"
android:src="@drawable/ic_notifications_off_24dp" android:gravity="center_vertical"
android:background="@android:color/transparent"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:orientation="horizontal">
android:maxLines="1" <ImageView
android:clickable="false" android:id="@+id/icon"
android:focusable="false" android:src="@drawable/ic_notifications_off_24dp"
android:layout_toEndOf="@id/icon" android:background="@android:color/transparent"
android:layout_marginStart="@dimen/notification_importance_drawable_padding" android:layout_width="wrap_content"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected" android:layout_height="wrap_content"
android:text="@string/notification_silence_title"/> android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:clickable="false"
android:focusable="false"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/notification_silence_title"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/summary" android:id="@+id/summary"
android:paddingTop="@dimen/notification_importance_button_padding" android:paddingTop="@dimen/notification_importance_button_padding"
@@ -150,7 +164,7 @@
android:focusable="false" android:focusable="false"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:layout_below="@id/icon" android:layout_below="@id/icon_label_container"
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail" android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
android:visibility="gone" /> android:visibility="gone" />
</com.android.settings.notification.NotificationButtonRelativeLayout> </com.android.settings.notification.NotificationButtonRelativeLayout>