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

Commit ab60c1fc authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Update gesture navigation tutorial for foldable devices.

- Updated mock conversation layout to work on large devices.
- Added AnimatedTaskView helper view to animate previous task view.
- Added animation from single previous app to two peaking previous apps.
- Updated app orientation to work with larger screens (forced protrait was causing letterboxing).

Test: manual, tested tutorial on non-foldable device, foldable device (closed, opened in landscape, opened in portait and switching between the three)
Bug: 198434693
Bug: 187701213
Known issue: 200579260

Change-Id: I98cb269f7d25985989cf66e791bf535228ab5293
parent 03be5344
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@
        <activity android:name="com.android.quickstep.interaction.GestureSandboxActivity"
            android:autoRemoveFromRecents="true"
            android:excludeFromRecents="true"
            android:screenOrientation="portrait"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.quickstep.action.GESTURE_SANDBOX"/>
+0 −17
Original line number Diff line number Diff line
<?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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
  <solid android:color="@color/gesture_tutorial_fake_previous_task_view_color" />
</shape>
+43 −2
Original line number Diff line number Diff line
@@ -41,13 +41,54 @@
        android:layout_height="20dp"
        android:visibility="invisible" />

    <View
    <com.android.quickstep.interaction.AnimatedTaskView
        android:id="@+id/gesture_tutorial_fake_previous_task_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleX="0.98"
        android:scaleY="0.98"
        android:visibility="invisible" />
        android:visibility="invisible">

        <View
            android:id="@+id/full_task_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="invisible"

            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

        <androidx.cardview.widget.CardView
            android:id="@+id/top_task_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:visibility="invisible"
            android:layout_marginBottom="@dimen/gesture_tutorial_multi_row_task_view_spacing"

            app:cardElevation="0dp"
            app:cardCornerRadius="@dimen/gesture_tutorial_small_task_view_corner_radius"
            app:layout_constraintVertical_chainStyle="spread"
            app:layout_constraintTop_toTopOf="@id/full_task_view"
            app:layout_constraintBottom_toTopOf="@id/bottom_task_view"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

        <androidx.cardview.widget.CardView
            android:id="@+id/bottom_task_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:visibility="invisible"

            app:cardElevation="0dp"
            app:cardCornerRadius="@dimen/gesture_tutorial_small_task_view_corner_radius"
            app:layout_constraintTop_toBottomOf="@id/top_task_view"
            app:layout_constraintBottom_toBottomOf="@id/full_task_view"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

    </com.android.quickstep.interaction.AnimatedTaskView>

    <FrameLayout
        android:id="@+id/gesture_tutorial_fake_task_view"
+6 −10
Original line number Diff line number Diff line
@@ -118,19 +118,17 @@

            <androidx.cardview.widget.CardView
                android:id="@+id/reply_icon_1"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_width="44dp"
                android:layout_height="44dp"
                android:layout_marginBottom="32dp"
                android:layout_marginStart="26dp"
                android:layout_marginEnd="342dp"

                app:cardElevation="0dp"
                app:cardCornerRadius="100dp"
                app:cardBackgroundColor="@color/mock_conversation_profile_icon"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintBottom_toTopOf="@id/message_2"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>
                app:layout_constraintStart_toStartOf="parent"/>

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
@@ -178,19 +176,17 @@

            <androidx.cardview.widget.CardView
                android:id="@+id/reply_icon_2"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_width="44dp"
                android:layout_height="44dp"
                android:layout_marginBottom="32dp"
                android:layout_marginStart="26dp"
                android:layout_marginEnd="342dp"

                app:cardElevation="0dp"
                app:cardCornerRadius="100dp"
                app:cardBackgroundColor="@color/mock_conversation_profile_icon"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintBottom_toTopOf="@id/message_4"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>
                app:layout_constraintStart_toStartOf="parent"/>

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@
    <dimen name="gesture_tutorial_subtitle_margin_start_end">16dp</dimen>
    <dimen name="gesture_tutorial_feedback_margin_start_end">24dp</dimen>
    <dimen name="gesture_tutorial_button_margin_start_end">18dp</dimen>
    <dimen name="gesture_tutorial_multi_row_task_view_spacing">72dp</dimen>
    <dimen name="gesture_tutorial_small_task_view_corner_radius">18dp</dimen>

    <!-- All Set page -->
    <dimen name="allset_page_margin_horizontal">40dp</dimen>
Loading