Work profile edu
+ Move bottom sheet edu resources to launcher3
Bug: 140099753
Test: Manual
Change-Id: I933acea2b503c0f98362322d24a067c33a1bb2a7
diff --git a/res/drawable-hdpi/work_tab_user_education.png b/res/drawable-hdpi/work_tab_user_education.png
deleted file mode 100644
index 1879dfb..0000000
--- a/res/drawable-hdpi/work_tab_user_education.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/work_tab_user_education.png b/res/drawable-mdpi/work_tab_user_education.png
deleted file mode 100644
index 65c7e63..0000000
--- a/res/drawable-mdpi/work_tab_user_education.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/work_tab_user_education.png b/res/drawable-xhdpi/work_tab_user_education.png
deleted file mode 100644
index 59df7a8..0000000
--- a/res/drawable-xhdpi/work_tab_user_education.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/work_tab_user_education.png b/res/drawable-xxhdpi/work_tab_user_education.png
deleted file mode 100644
index 3c6aa20..0000000
--- a/res/drawable-xxhdpi/work_tab_user_education.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/bottom_sheet_top_border.xml b/res/drawable/bottom_sheet_top_border.xml
new file mode 100644
index 0000000..23f4e51
--- /dev/null
+++ b/res/drawable/bottom_sheet_top_border.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<vector android:height="15.53398dp" android:viewportHeight="32"
+ android:viewportWidth="412" android:width="200dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M412,32v-2.64C349.26,10.51 279.5,0 206,0S62.74,10.51 0,29.36V32H412z"/>
+</vector>
diff --git a/res/layout/work_profile_edu.xml b/res/layout/work_profile_edu.xml
new file mode 100644
index 0000000..a8e3d20
--- /dev/null
+++ b/res/layout/work_profile_edu.xml
@@ -0,0 +1,61 @@
+<?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.
+-->
+<com.android.launcher3.views.WorkEduView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:gravity="bottom"
+ android:orientation="vertical">
+
+ <View
+ android:layout_width="match_parent"
+ android:backgroundTint="@color/bottom_panel_background"
+ android:layout_height="32dp"
+ android:background="@drawable/bottom_sheet_top_border" />
+
+ <LinearLayout
+ android:id="@+id/view_wrapper"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/bottom_panel_background"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/bottom_sheet_edu_padding"
+ android:paddingRight="@dimen/bottom_sheet_edu_padding">
+
+ <TextView
+ android:id="@+id/content_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="48dp"
+ android:layout_marginBottom="48dp"
+ android:fontFamily="google-sans"
+ android:text="@string/work_profile_edu_personal_apps"
+ android:textAlignment="center"
+ android:textColor="@android:color/white"
+ android:textSize="20sp" />
+
+ <Button
+ android:id="@+id/proceed"
+ android:layout_width="wrap_content"
+ android:layout_height="48dp"
+ android:layout_gravity="end"
+ android:background="?android:attr/selectableItemBackground"
+ android:gravity="center"
+ android:text="@string/work_profile_edu_next"
+ android:textAlignment="center"
+ android:textColor="@android:color/white" />
+ </LinearLayout>
+
+</com.android.launcher3.views.WorkEduView>
\ No newline at end of file
diff --git a/res/layout/work_tab_bottom_user_education_view.xml b/res/layout/work_tab_bottom_user_education_view.xml
deleted file mode 100644
index ac2deeb..0000000
--- a/res/layout/work_tab_bottom_user_education_view.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 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.
--->
-<com.android.launcher3.views.BottomUserEducationView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:background="?android:attr/colorAccent"
- android:elevation="2dp"
- android:focusable="true"
- android:orientation="horizontal">
-
- <ImageView
- android:layout_width="134dp"
- android:layout_height="134dp"
- android:layout_marginTop="28dp"
- android:layout_marginLeft="20dp"
- android:src="@drawable/work_tab_user_education"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="24dp"
- android:orientation="vertical">
-
- <ImageView
- android:id="@+id/close_bottom_user_tip"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginTop="12dp"
- android:layout_marginEnd="12dp"
- android:layout_gravity="right"
- android:contentDescription="@string/bottom_work_tab_user_education_close_button"
- android:src="@drawable/ic_remove_no_shadow"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="24dp"
- android:fontFamily="roboto-medium"
- android:text="@string/bottom_work_tab_user_education_title"
- android:textColor="@android:color/white"
- android:textSize="20sp"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="24dp"
- android:text="@string/bottom_work_tab_user_education_body"
- android:textColor="@android:color/white"
- android:textSize="14sp"/>
-
- </LinearLayout>
-
-</com.android.launcher3.views.BottomUserEducationView>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 815ae21..36f8468 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -43,4 +43,7 @@
<color name="back_gesture_tutorial_title_color">#FF000000</color>
<color name="back_gesture_tutorial_action_button_label_color">#FFFFFFFF</color>
<color name="back_gesture_tutorial_primary_color">#1A73E8</color> <!-- Blue -->
+
+
+ <color name="bottom_panel_background">#f01A73E8</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4bcb8a7..0293573 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -235,4 +235,7 @@
<!-- Theming related -->
<dimen name="default_dialog_corner_radius">8dp</dimen>
+ <!-- Onboarding bottomsheet related -->
+ <dimen name="bottom_sheet_edu_padding">24dp</dimen>
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 218f6db..3f279f4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -327,17 +327,20 @@
<!-- This string is in the work profile tab when a user has All Apps open on their phone. This is a label for a toggle to turn the work profile on and off. "Work profile" means a separate profile on a user's phone that's specifically for their work apps and managed by their company. "Work" is used as an adjective.-->
<string name="work_profile_toggle_label">Work profile</string>
- <!-- Title of an overlay in All Apps. This overlay is letting a user know about their work profile, which is managed by their employer. "Work apps" are apps in a user's work profile.-->
- <string name="bottom_work_tab_user_education_title">Find work apps here</string>
- <!-- Text in an overlay in All Apps. This overlay is letting a user know about their work profile, which is managed by their employer.-->
- <string name="bottom_work_tab_user_education_body">Each work app has a badge and is kept secure by your organization. Move apps to your Home screen for easier access.</string>
+ <!--- User onboarding title for personal apps -->
+ <string name="work_profile_edu_personal_apps">Personal apps are private & can\'t be seen by IT</string>
+ <!--- User onboarding title for work profile apps -->
+ <string name="work_profile_edu_work_apps">Work apps are badged and monitored by IT</string>
+ <!-- Action label to proceed to the next work profile edu section-->
+ <string name="work_profile_edu_next">Next</string>
+ <!-- Action label to finish work profile edu-->
+ <string name="work_profile_edu_accept">Got it</string>
+
<!-- This string is in the work profile tab when a user has All Apps open on their phone. It describes the label of a toggle, "Work profile," as being managed by the user's employer.
"Organization" is used to represent a variety of businesses, non-profits, and educational institutions).-->
<string name="work_mode_on_label">Managed by your organization</string>
<!-- This string appears under a the label of a toggle in the work profile tab on a user's phone. It describes the status of the toggle, "Work profile," when it's turned off. "Work profile" means a separate profile on a user's phone that's speficially for their work apps and is managed by their company.-->
<string name="work_mode_off_label">Notifications and apps are off</string>
- <string name="bottom_work_tab_user_education_close_button">Close</string>
- <string name="bottom_work_tab_user_education_closed">Closed</string>
<!-- Failed action error message: e.g. Failed: Pause -->
<string name="remote_action_failed">Failed: <xliff:g id="what" example="Pause">%1$s</xliff:g></string>