UX updates for notif history
- no relative time
- fix background color in dark theme
- fix text alignment in RTL
Test: manual
Fixes: 160061165
Fixes: 160388261
Fixes: 156410384
Change-Id: I7d4c5a5f81ce5b5ce43fdaa3ee99184906753a76
(cherry picked from commit 3dd023f363f205292c2d869b82fa140cee020fce)
diff --git a/res/layout/notification_history_app_layout.xml b/res/layout/notification_history_app_layout.xml
index 481253a..aaca0fd 100644
--- a/res/layout/notification_history_app_layout.xml
+++ b/res/layout/notification_history_app_layout.xml
@@ -55,7 +55,8 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingStart="6dp"
- android:layout_gravity="center_vertical"
+ android:layout_gravity="start|center_vertical"
+ android:textDirection="locale"
android:paddingTop="8dp"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"/>
</LinearLayout>
diff --git a/res/layout/notification_sbn_log_row.xml b/res/layout/notification_sbn_log_row.xml
index 6156d26..ee143b0 100644
--- a/res/layout/notification_sbn_log_row.xml
+++ b/res/layout/notification_sbn_log_row.xml
@@ -130,6 +130,6 @@
<View
android:id="@+id/divider"
android:layout_width="match_parent"
- android:layout_height="0.5dp"
- android:background="@color/material_grey_300" />
+ android:layout_height="wrap_content"
+ android:background="?android:attr/listDivider" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index 4ce02ee..354da77 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -27,6 +27,7 @@
<color name="notification_importance_selection_bg">@*android:color/material_grey_800</color>
<color name="notification_importance_button_selected">#AECBFA</color> <!-- material blue 200 -->
<color name="notification_importance_button_unselected">#5F6368</color>
+ <color name="notification_history_background">#202124</color>
<color name="face_intro_outline">?android:attr/colorAccent</color>
<!-- Palette list preference colors. -->
<color name="palette_list_gradient_background">@android:color/black</color>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 06f135f..4904160 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -129,6 +129,7 @@
<color name="notification_importance_button_unselected">#DADCE0</color>
<color name="notification_importance_button_selected">#1967D2</color> <!-- material blue 700 -->
<color name="notification_importance_selection_bg">#FFFFFF</color>
+ <color name="notification_history_background">?android:attr/colorBackgroundFloating</color>
<!-- launcher icon color -->
<color name="icon_launcher_setting_color">@*android:color/accent_device_default_light</color>
diff --git a/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java b/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
index 4991548..da1ed11 100644
--- a/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
+++ b/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
@@ -33,7 +33,6 @@
NotificationHistoryViewHolder(View itemView) {
super(itemView);
mTime = itemView.findViewById(R.id.timestamp);
- mTime.setShowRelativeTime(true);
mTitle = itemView.findViewById(R.id.title);
mSummary = itemView.findViewById(R.id.text);
}