Merge "Letterbox education: Updated UI" into tm-qpr-dev am: 4f878b4cc1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19701009

Change-Id: Ib8966d583400037e3c787822ab1e27f16d09c809
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Oleg Blinnikov
2022-08-31 10:48:44 +00:00
committed by Automerger Merge Worker
8 changed files with 48 additions and 86 deletions

View File

@@ -15,15 +15,12 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="@dimen/letterbox_education_dialog_icon_size"
android:height="@dimen/letterbox_education_dialog_icon_size"
android:viewportWidth="48"
android:viewportHeight="48">
android:width="@dimen/letterbox_education_dialog_title_icon_width"
android:height="@dimen/letterbox_education_dialog_title_icon_height"
android:viewportWidth="45"
android:viewportHeight="44">
<path
android:fillColor="@color/letterbox_education_accent_primary"
android:fillType="evenOdd"
android:pathData="M2 8C0.895431 8 0 8.89543 0 10V38C0 39.1046 0.895431 40 2 40H46C47.1046 40 48 39.1046 48 38V10C48 8.89543 47.1046 8 46 8H2ZM44 12H4V36H44V12Z" />
<path
android:fillColor="@color/letterbox_education_accent_primary"
android:pathData="M 17 14 L 31 14 Q 32 14 32 15 L 32 33 Q 32 34 31 34 L 17 34 Q 16 34 16 33 L 16 15 Q 16 14 17 14 Z" />
android:pathData="M11 40H19C19 42.2 17.2 44 15 44C12.8 44 11 42.2 11 40ZM7 38L23 38V34L7 34L7 38ZM30 19C30 26.64 24.68 30.72 22.46 32L7.54 32C5.32 30.72 0 26.64 0 19C0 10.72 6.72 4 15 4C23.28 4 30 10.72 30 19ZM26 19C26 12.94 21.06 8 15 8C8.94 8 4 12.94 4 19C4 23.94 6.98 26.78 8.7 28L21.3 28C23.02 26.78 26 23.94 26 19ZM39.74 14.74L37 16L39.74 17.26L41 20L42.26 17.26L45 16L42.26 14.74L41 12L39.74 14.74ZM35 12L36.88 7.88L41 6L36.88 4.12L35 0L33.12 4.12L29 6L33.12 7.88L35 12Z" />
</vector>

View File

@@ -15,18 +15,16 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="@dimen/letterbox_education_dialog_icon_size"
android:height="@dimen/letterbox_education_dialog_icon_size"
android:viewportWidth="48"
android:viewportHeight="48">
android:width="@dimen/letterbox_education_dialog_icon_width"
android:height="@dimen/letterbox_education_dialog_icon_height"
android:viewportWidth="40"
android:viewportHeight="32">
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:fillType="evenOdd"
android:pathData="M2 8C0.895431 8 0 8.89543 0 10V38C0 39.1046 0.895431 40 2 40H46C47.1046 40 48 39.1046 48 38V10C48 8.89543 47.1046 8 46 8H2ZM44 12H4V36H44V12Z" />
android:pathData="M4 0C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H36C38.2091 32 40 30.2091 40 28V4C40 1.79086 38.2091 0 36 0H4ZM36 4H4V28H36V4Z" />
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:pathData="M 14 22 H 30 V 26 H 14 V 22 Z" />
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:pathData="M26 16L34 24L26 32V16Z" />
android:pathData="M19.98 8L17.16 10.82L20.32 14L12 14V18H20.32L17.14 21.18L19.98 24L28 16.02L19.98 8Z" />
</vector>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 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 xmlns:android="http://schemas.android.com/apk/res/android"
android:width="@dimen/letterbox_education_dialog_icon_size"
android:height="@dimen/letterbox_education_dialog_icon_size"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:fillType="evenOdd"
android:pathData="M22.56 2H26C37.02 2 46 10.98 46 22H42C42 14.44 36.74 8.1 29.7 6.42L31.74 10L28.26 12L22.56 2ZM22 46H25.44L19.74 36L16.26 38L18.3 41.58C11.26 39.9 6 33.56 6 26H2C2 37.02 10.98 46 22 46ZM20.46 12L36 27.52L27.54 36L12 20.48L20.46 12ZM17.64 9.18C18.42 8.4 19.44 8 20.46 8C21.5 8 22.52 8.4 23.3 9.16L38.84 24.7C40.4 26.26 40.4 28.78 38.84 30.34L30.36 38.82C29.58 39.6 28.56 40 27.54 40C26.52 40 25.5 39.6 24.72 38.82L9.18 23.28C7.62 21.72 7.62 19.2 9.18 17.64L17.64 9.18Z" />
</vector>

View File

@@ -15,18 +15,12 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="@dimen/letterbox_education_dialog_icon_size"
android:height="@dimen/letterbox_education_dialog_icon_size"
android:viewportWidth="48"
android:viewportHeight="48">
android:width="@dimen/letterbox_education_dialog_icon_width"
android:height="@dimen/letterbox_education_dialog_icon_height"
android:viewportWidth="40"
android:viewportHeight="32">
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:fillType="evenOdd"
android:pathData="M2 8C0.895431 8 0 8.89543 0 10V38C0 39.1046 0.895431 40 2 40H46C47.1046 40 48 39.1046 48 38V10C48 8.89543 47.1046 8 46 8H2ZM44 12H4V36H44V12Z" />
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:pathData="M6 16C6 14.8954 6.89543 14 8 14H21C22.1046 14 23 14.8954 23 16V32C23 33.1046 22.1046 34 21 34H8C6.89543 34 6 33.1046 6 32V16Z" />
<path
android:fillColor="@color/letterbox_education_text_secondary"
android:pathData="M25 16C25 14.8954 25.8954 14 27 14H40C41.1046 14 42 14.8954 42 16V32C42 33.1046 41.1046 34 40 34H27C25.8954 34 25 33.1046 25 32V16Z" />
android:pathData="M40 28L40 4C40 1.8 38.2 -7.86805e-08 36 -1.74846e-07L26 -6.11959e-07C23.8 -7.08124e-07 22 1.8 22 4L22 28C22 30.2 23.8 32 26 32L36 32C38.2 32 40 30.2 40 28ZM14 28L4 28L4 4L14 4L14 28ZM18 28L18 4C18 1.8 16.2 -1.04033e-06 14 -1.1365e-06L4 -1.57361e-06C1.8 -1.66978e-06 -7.86805e-08 1.8 -1.74846e-07 4L-1.22392e-06 28C-1.32008e-06 30.2 1.8 32 4 32L14 32C16.2 32 18 30.2 18 28Z" />
</vector>

View File

@@ -26,7 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="12dp"/>
android:layout_marginBottom="20dp"/>
<TextView
android:id="@+id/letterbox_education_dialog_action_text"

View File

@@ -50,13 +50,16 @@
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="24dp">
android:paddingTop="32dp"
android:paddingBottom="32dp"
android:paddingLeft="56dp"
android:paddingRight="56dp">
<ImageView
android:layout_width="@dimen/letterbox_education_dialog_icon_size"
android:layout_height="@dimen/letterbox_education_dialog_icon_size"
android:layout_marginBottom="12dp"
android:src="@drawable/letterbox_education_ic_letterboxed_app"/>
android:layout_width="@dimen/letterbox_education_dialog_title_icon_width"
android:layout_height="@dimen/letterbox_education_dialog_title_icon_height"
android:layout_marginBottom="17dp"
android:src="@drawable/letterbox_education_ic_light_bulb"/>
<TextView
android:id="@+id/letterbox_education_dialog_title"
@@ -68,16 +71,6 @@
android:textColor="@color/compat_controls_text"
android:textSize="24sp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:lineSpacingExtra="4sp"
android:text="@string/letterbox_education_dialog_subtext"
android:textAlignment="center"
android:textColor="@color/letterbox_education_text_secondary"
android:textSize="14sp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -88,16 +81,16 @@
<com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogActionLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:icon="@drawable/letterbox_education_ic_screen_rotation"
app:text="@string/letterbox_education_screen_rotation_text"/>
app:icon="@drawable/letterbox_education_ic_reposition"
app:text="@string/letterbox_education_reposition_text"/>
<com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogActionLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart=
"@dimen/letterbox_education_dialog_space_between_actions"
app:icon="@drawable/letterbox_education_ic_reposition"
app:text="@string/letterbox_education_reposition_text"/>
app:icon="@drawable/letterbox_education_ic_split_screen"
app:text="@string/letterbox_education_split_screen_text"/>
</LinearLayout>
@@ -105,7 +98,7 @@
android:id="@+id/letterbox_education_dialog_dismiss_button"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginTop="48dp"
android:layout_marginTop="40dp"
android:background=
"@drawable/letterbox_education_dismiss_button_background_ripple"
android:text="@string/letterbox_education_got_it"

View File

@@ -246,8 +246,17 @@
<!-- The corner radius of the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_corner_radius">28dp</dimen>
<!-- The size of an icon in the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_icon_size">48dp</dimen>
<!-- The width of the top icon in the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_title_icon_width">45dp</dimen>
<!-- The height of the top icon in the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_title_icon_height">44dp</dimen>
<!-- The width of an icon in the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_icon_width">40dp</dimen>
<!-- The height of an icon in the letterbox education dialog. -->
<dimen name="letterbox_education_dialog_icon_height">32dp</dimen>
<!-- The fixed width of the dialog if there is enough space in the parent. -->
<dimen name="letterbox_education_dialog_width">472dp</dimen>

View File

@@ -172,16 +172,13 @@
<string name="camera_compat_dismiss_button_description">No camera issues? Tap to dismiss.</string>
<!-- The title of the letterbox education dialog. [CHAR LIMIT=NONE] -->
<string name="letterbox_education_dialog_title">Some apps work best in portrait</string>
<string name="letterbox_education_dialog_title">See and do more</string>
<!-- The subtext of the letterbox education dialog. [CHAR LIMIT=NONE] -->
<string name="letterbox_education_dialog_subtext">Try one of these options to make the most of your space</string>
<!-- Description of the rotate screen action. [CHAR LIMIT=NONE] -->
<string name="letterbox_education_screen_rotation_text">Rotate your device to go full screen</string>
<!-- Description of the split screen action. [CHAR LIMIT=NONE] -->
<string name="letterbox_education_split_screen_text">Drag in another app for split-screen</string>
<!-- Description of the reposition app action. [CHAR LIMIT=NONE] -->
<string name="letterbox_education_reposition_text">Double-tap next to an app to reposition it</string>
<string name="letterbox_education_reposition_text">Double-tap outside an app to reposition it</string>
<!-- Button text for dismissing the letterbox education dialog. [CHAR LIMIT=20] -->
<string name="letterbox_education_got_it">Got it</string>