DO NOT MERGE: Show an onboarding screen for priority conversations
Test: atest SystemUITests
Bug: 151843296
Change-Id: I5280cff71591f8551016b6ba00d3a579507367cb
diff --git a/packages/SystemUI/res/layout/priority_onboarding_half_shell.xml b/packages/SystemUI/res/layout/priority_onboarding_half_shell.xml
new file mode 100644
index 0000000..ccb4f78
--- /dev/null
+++ b/packages/SystemUI/res/layout/priority_onboarding_half_shell.xml
@@ -0,0 +1,194 @@
+<!--
+ ~ 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
+ -->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/onboarding_half_shell_container"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal|bottom"
+ android:paddingStart="4dp"
+ android:paddingEnd="4dp"
+ >
+
+ <LinearLayout
+ android:id="@+id/half_shell"
+ android:layout_width="@dimen/qs_panel_width"
+ android:layout_height="wrap_content"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:orientation="vertical"
+ android:gravity="bottom"
+ android:layout_gravity="center_horizontal|bottom"
+ android:background="@drawable/rounded_bg_full"
+ >
+
+ <!-- We have a known number of rows that can be shown; just design them all here -->
+ <LinearLayout
+ android:id="@+id/show_at_top_tip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:orientation="horizontal"
+ >
+ <ImageView
+ android:id="@+id/bell_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_notifications_alert"
+ android:tint="?android:attr/colorControlNormal" />
+
+ <TextView
+ android:id="@+id/show_at_top_text"
+ android:layout_width="wrap_content"
+ android:layout_height="48dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:gravity="center_vertical|start"
+ android:textSize="15sp"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@string/priority_onboarding_show_at_top_text"
+ style="@style/TextAppearance.NotificationInfo"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/show_avatar_tip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:orientation="horizontal"
+ >
+ <ImageView
+ android:id="@+id/avatar_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_person"
+ android:tint="?android:attr/colorControlNormal" />
+
+ <TextView
+ android:id="@+id/avatar_text"
+ android:layout_width="wrap_content"
+ android:layout_height="48dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:gravity="center_vertical|start"
+ android:textSize="15sp"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@string/priority_onboarding_show_avatar_text"
+ style="@style/TextAppearance.NotificationInfo"
+ />
+
+ </LinearLayout>
+
+ <!-- These rows show optionally -->
+
+ <LinearLayout
+ android:id="@+id/floating_bubble_tip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:orientation="horizontal"
+ >
+
+ <ImageView
+ android:id="@+id/bubble_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_create_bubble"
+ android:tint="?android:attr/colorControlNormal" />
+
+ <TextView
+ android:id="@+id/bubble_text"
+ android:layout_width="wrap_content"
+ android:layout_height="48dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:gravity="center_vertical|start"
+ android:textSize="15sp"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@string/priority_onboarding_appear_as_bubble_text"
+ style="@style/TextAppearance.NotificationInfo"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/ignore_dnd_tip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:orientation="horizontal"
+ >
+
+ <ImageView
+ android:id="@+id/dnd_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/moon"
+ android:tint="?android:attr/colorControlNormal" />
+
+ <TextView
+ android:id="@+id/dnd_text"
+ android:layout_width="wrap_content"
+ android:layout_height="48dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:gravity="center_vertical|start"
+ android:textSize="15sp"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@string/priority_onboarding_ignores_dnd_text"
+ style="@style/TextAppearance.NotificationInfo"
+ />
+
+ </LinearLayout>
+
+ <!-- Bottom button container -->
+ <RelativeLayout
+ android:id="@+id/button_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:orientation="horizontal"
+ >
+ <TextView
+ android:id="@+id/done_button"
+ android:text="@string/priority_onboarding_done_button_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:gravity="end|center_vertical"
+ android:minWidth="@dimen/notification_importance_toggle_size"
+ android:minHeight="@dimen/notification_importance_toggle_size"
+ android:maxWidth="125dp"
+ style="@style/TextAppearance.NotificationInfo.Button"/>
+
+ </RelativeLayout>
+
+ </LinearLayout>
+</FrameLayout>