Merge "Redesign individual conversation page" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
43d9013aaa
158
res/layout/notif_priority_conversation_preference.xml
Normal file
158
res/layout/notif_priority_conversation_preference.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2020 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/app_entities_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/notification_importance_toggle_marginTop"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.android.settings.notification.NotificationButtonRelativeLayout
|
||||
android:id="@+id/priority_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/notification_importance_button_padding"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
<ImageView
|
||||
android:id="@+id/priority_icon"
|
||||
android:src="@drawable/ic_important_outline"
|
||||
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/priority_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_toEndOf="@id/priority_icon"
|
||||
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
|
||||
android:text="@string/notification_priority_title"/>
|
||||
<TextView
|
||||
android:id="@+id/priority_summary"
|
||||
android:paddingTop="@dimen/notification_importance_button_padding"
|
||||
android:text="@string/notification_channel_summary_priority"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:layout_below="@id/priority_icon"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
||||
android:visibility="gone" />
|
||||
</com.android.settings.notification.NotificationButtonRelativeLayout>
|
||||
|
||||
<com.android.settings.notification.NotificationButtonRelativeLayout
|
||||
android:id="@+id/alert"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/notification_importance_button_padding"
|
||||
android:layout_marginTop="@dimen/notification_importance_button_separation"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
<ImageView
|
||||
android:id="@+id/alert_icon"
|
||||
android:src="@drawable/ic_notifications_alert"
|
||||
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/alert_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_toEndOf="@id/alert_icon"
|
||||
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
|
||||
android:text="@string/notification_alert_title"/>
|
||||
<TextView
|
||||
android:id="@+id/alert_summary"
|
||||
android:paddingTop="@dimen/notification_importance_button_padding"
|
||||
android:text="@string/notification_channel_summary_default"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:layout_below="@id/alert_icon"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
||||
android:visibility="gone" />
|
||||
</com.android.settings.notification.NotificationButtonRelativeLayout>
|
||||
|
||||
<com.android.settings.notification.NotificationButtonRelativeLayout
|
||||
android:id="@+id/silence"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/notification_importance_button_padding"
|
||||
android:layout_marginTop="@dimen/notification_importance_button_separation"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
<ImageView
|
||||
android:id="@+id/silence_icon"
|
||||
android:src="@drawable/ic_notifications_off_24dp"
|
||||
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/silence_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_toEndOf="@id/silence_icon"
|
||||
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
|
||||
android:text="@string/notification_silence_title"/>
|
||||
<TextView
|
||||
android:id="@+id/silence_summary"
|
||||
android:paddingTop="@dimen/notification_importance_button_padding"
|
||||
android:text="@string/notification_channel_summary_low"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:layout_below="@id/silence_icon"
|
||||
android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"
|
||||
android:visibility="gone" />
|
||||
</com.android.settings.notification.NotificationButtonRelativeLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -8406,6 +8406,12 @@
|
||||
<!-- [CHAR LIMIT=180] Notification importance description. More details from allow_interruption string - specifics of how notifications may interrupt. -->
|
||||
<string name="allow_interruption_summary">Let the app make sound, vibrate, and/or pop notifications on screen</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: important conversation level -->
|
||||
<string name="notification_priority_title">Priority</string>
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: important conversation level summary -->
|
||||
<string name="notification_channel_summary_priority">Shows at top of conversation section and appears as a bubble.</string>
|
||||
|
||||
<!-- Channel summaries for the app notification page -->
|
||||
|
||||
<!-- [CHAR LIMIT=150] Notification Importance title: min importance level summary -->
|
||||
|
@@ -26,19 +26,11 @@
|
||||
settings:allowDividerBelow="true"/>
|
||||
|
||||
<!-- important conversation -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="important"
|
||||
<com.android.settings.notification.app.ConversationPriorityPreference
|
||||
android:key="priority"
|
||||
android:title="@string/notification_conversation_important"
|
||||
android:icon="@drawable/ic_important_outline"
|
||||
settings:restrictedSwitchSummary="@string/enabled_by_admin"
|
||||
settings:allowDividerAbove="true"/>
|
||||
|
||||
<!-- silence -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="alerting"
|
||||
android:icon="@drawable/ic_notification_alert"
|
||||
android:title="@string/notification_alert_title"
|
||||
android:summary="@string/notification_channel_summary_default"/>
|
||||
settings:allowDividerAbove="true"
|
||||
settings:allowDividerBelow="true"/>
|
||||
|
||||
<!-- bubbles -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
@@ -48,47 +40,6 @@
|
||||
android:icon="@drawable/ic_create_bubble"
|
||||
settings:restrictedSwitchSummary="@string/enabled_by_admin" />
|
||||
|
||||
<!-- peeking -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="high_importance"
|
||||
android:title="@string/notification_importance_high_title"
|
||||
android:summary="@string/notification_channel_summary_high"/>
|
||||
|
||||
<!-- Visibility Override -->
|
||||
<com.android.settings.RestrictedListPreference
|
||||
android:key="visibility_override"
|
||||
android:icon="@drawable/ic_lock"
|
||||
android:title="@string/app_notification_visibility_override_title"/>
|
||||
|
||||
<!-- Show badge -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="badge"
|
||||
android:title="@string/notification_channel_badge_title"
|
||||
settings:useAdditionalSummary="true"
|
||||
settings:restrictedSwitchSummary="@string/enabled_by_admin"/>
|
||||
|
||||
<!-- Lights -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="lights"
|
||||
android:title="@string/notification_show_lights_title"
|
||||
settings:useAdditionalSummary="true"/>
|
||||
|
||||
<!-- Vibration -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="vibrate"
|
||||
android:icon="@drawable/ic_volume_ringer_vibrate"
|
||||
android:title="@string/notification_vibrate_title"
|
||||
settings:useAdditionalSummary="true" />
|
||||
|
||||
<!-- ringtone -->
|
||||
<com.android.settings.notification.app.NotificationSoundPreference
|
||||
android:key="ringtone"
|
||||
android:title="@string/notification_channel_sound_title"
|
||||
android:dialogTitle="@string/notification_channel_sound_title"
|
||||
android:icon="@drawable/ic_media_stream"
|
||||
android:showSilent="true"
|
||||
android:showDefault="true"/>
|
||||
|
||||
<!-- demote -->
|
||||
<Preference
|
||||
android:key="demote"
|
||||
@@ -97,22 +48,55 @@
|
||||
android:summary="@string/demote_conversation_summary"
|
||||
settings:allowDividerAbove="true"/>
|
||||
|
||||
<Preference
|
||||
android:key="add_to_home"
|
||||
android:title="@string/notification_conversation_add_to_home"
|
||||
android:icon="@drawable/ic_add_to_home"
|
||||
settings:allowDividerAbove="true"/>
|
||||
|
||||
<Preference
|
||||
android:key="app_link"
|
||||
android:title="@string/app_settings_link"
|
||||
settings:allowDividerAbove="true"/>
|
||||
|
||||
<com.android.settings.notification.app.NotificationFooterPreference
|
||||
android:key="desc" />
|
||||
|
||||
<com.android.settings.notification.app.NotificationFooterPreference
|
||||
android:key="block_desc"
|
||||
settings:allowDividerAbove="false"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="channel_advanced"
|
||||
android:order="50"
|
||||
settings:initialExpandedChildrenCount="0">
|
||||
|
||||
<!-- peeking -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="high_importance"
|
||||
android:title="@string/notification_importance_high_title"
|
||||
android:summary="@string/notification_channel_summary_high"/>
|
||||
|
||||
<!-- ringtone -->
|
||||
<com.android.settings.notification.app.NotificationSoundPreference
|
||||
android:key="ringtone"
|
||||
android:title="@string/notification_channel_sound_title"
|
||||
android:dialogTitle="@string/notification_channel_sound_title"
|
||||
android:icon="@drawable/ic_media_stream"
|
||||
android:showSilent="true"
|
||||
android:showDefault="true"/>
|
||||
|
||||
<!-- Visibility Override -->
|
||||
<com.android.settings.RestrictedListPreference
|
||||
android:key="visibility_override"
|
||||
android:icon="@drawable/ic_lock"
|
||||
android:title="@string/app_notification_visibility_override_title"/>
|
||||
|
||||
<!-- Show badge -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="badge"
|
||||
android:title="@string/notification_channel_badge_title"
|
||||
settings:useAdditionalSummary="true"
|
||||
settings:restrictedSwitchSummary="@string/enabled_by_admin"/>
|
||||
|
||||
<!-- Lights -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="lights"
|
||||
android:title="@string/notification_show_lights_title"
|
||||
settings:useAdditionalSummary="true"/>
|
||||
|
||||
<!-- Vibration -->
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="vibrate"
|
||||
android:icon="@drawable/ic_volume_ringer_vibrate"
|
||||
android:title="@string/notification_vibrate_title"
|
||||
settings:useAdditionalSummary="true" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user