Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16e0b726 authored by Tom Natan's avatar Tom Natan Committed by Android (Google) Code Review
Browse files

Merge "Letterbox Education: Cleanup the toast layout."

parents 21466743 6f31ad81
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
<?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="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:fillColor="@android:color/system_neutral2_400"
        android:pathData="M16.59,8.59L12.0,13.17 7.41,8.59 6.0,10.0l6.0,6.0 6.0,-6.0z"/>
</vector>
 No newline at end of file
+0 −20
Original line number Diff line number Diff line
<?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.
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="@android:color/system_neutral2_200">
    <item android:drawable="@drawable/letterbox_education_ic_expand_more"/>
</ripple>
 No newline at end of file
+0 −61
Original line number Diff line number Diff line
<!--
  ~ 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.
  -->
<com.android.wm.shell.compatui.LetterboxEduToastLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/compat_controls_background"
    android:gravity="center"
    android:paddingVertical="14dp"
    android:paddingHorizontal="16dp">

    <!-- Adding an extra layer to animate the alpha of the background and content separately. -->
    <LinearLayout
        android:id="@+id/letterbox_education_content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/letterbox_education_icon"
            android:layout_width="@dimen/letterbox_education_toast_icon_size"
            android:layout_height="@dimen/letterbox_education_toast_icon_size"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxWidth="@dimen/letterbox_education_toast_text_max_width"
            android:paddingHorizontal="16dp"
            android:lineSpacingExtra="5sp"
            android:text="@string/letterbox_education_toast_title"
            android:textAlignment="viewStart"
            android:textColor="@color/compat_controls_text"
            android:textSize="16sp"
            android:maxLines="1"
            android:ellipsize="end"/>

        <ImageButton
            android:id="@+id/letterbox_education_toast_expand"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/letterbox_education_ic_expand_more_ripple"
            android:background="@android:color/transparent"
            android:contentDescription="@string/letterbox_education_expand_button_description"/>

    </LinearLayout>

</com.android.wm.shell.compatui.LetterboxEduToastLayout>
+0 −12
Original line number Diff line number Diff line
@@ -219,18 +219,9 @@
    <!-- The width of the camera compat hint. -->
    <dimen name="camera_compat_hint_width">143dp</dimen>

    <!-- The corner radius of the letterbox education toast. -->
    <dimen name="letterbox_education_toast_corner_radius">100dp</dimen>

    <!-- The corner radius of the letterbox education dialog. -->
    <dimen name="letterbox_education_dialog_corner_radius">28dp</dimen>

    <!-- The margin between the letterbox education toast/dialog and the bottom of the task. -->
    <dimen name="letterbox_education_margin_bottom">16dp</dimen>

    <!-- The size of the icon in the letterbox education toast. -->
    <dimen name="letterbox_education_toast_icon_size">24dp</dimen>

    <!-- The size of an icon in the letterbox education dialog. -->
    <dimen name="letterbox_education_dialog_icon_size">48dp</dimen>

@@ -243,9 +234,6 @@
    <!-- The maximum width of the title and subtitle in the letterbox education dialog. -->
    <dimen name="letterbox_education_dialog_title_max_width">444dp</dimen>

    <!-- The maximum width of the text in the letterbox education toast. -->
    <dimen name="letterbox_education_toast_text_max_width">398dp</dimen>

    <!-- The distance that the letterbox education dialog will move up during appear/dismiss
         animation.  -->
    <dimen name="letterbox_education_dialog_animation_elevation">20dp</dimen>
+0 −6
Original line number Diff line number Diff line
@@ -174,9 +174,6 @@
    <!-- The title of the letterbox education dialog. [CHAR LIMIT=NONE] -->
    <string name="letterbox_education_dialog_title">Get the most out of <xliff:g id="app_name" example="YouTube">%s</xliff:g></string>

    <!-- The title of the letterbox education toast. [CHAR LIMIT=60] -->
    <string name="letterbox_education_toast_title">Rotate your device for a full-screen view</string>

    <!-- Description of the rotate screen into portrait action. [CHAR LIMIT=NONE] -->
    <string name="letterbox_education_screen_rotation_portrait_text">Rotate your screen to portrait</string>

@@ -192,7 +189,4 @@
    <!-- Button text for dismissing the letterbox education dialog. [CHAR LIMIT=20] -->
    <string name="letterbox_education_got_it">Got it</string>

    <!-- Accessibility description of the letterbox education toast expand to dialog button. [CHAR LIMIT=NONE] -->
    <string name="letterbox_education_expand_button_description">Expand for more information.</string>

</resources>
Loading