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

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

Update gesture nav tutorial with updated phone landscape layouts

- Updated layout files to support landscape mode on phones
- Updated All Set page to say "tablet" rather than "phone" on tablets
- Hiding feedback view during gestures for better visibility
- Renamed files and resources to say "tablet" rather than "foldable"
- Added custom layout logic for the mock hotseat on foldables
- Updated feedback view margins

Test: manual
Fixes: 215063763
Fixes: 206895841
Fixes: 219251891
Change-Id: I56f7f33dd0617bdeeca4863f7d5de0143376c8bf
parent 906e96a6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@
    limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:shape="rectangle">
  <corners android:radius="28dp"/>
  <solid android:color="?android:attr/colorBackgroundFloating"/>
  <solid android:color="?androidprv:attr/colorSurface"/>
</shape>
+80 −0
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.
-->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:paddingTop="26dp"
    android:paddingBottom="26dp"
    android:paddingStart="56dp"
    android:paddingEnd="56dp">

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_1"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_1"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintVertical_chainStyle="spread_inside"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@id/hotseat_icon_2"
        app:layout_constraintStart_toStartOf="parent"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_2"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_2"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toBottomOf="@id/hotseat_icon_1"
        app:layout_constraintBottom_toTopOf="@id/hotseat_icon_3"
        app:layout_constraintStart_toStartOf="parent"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_3"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_3"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toBottomOf="@id/hotseat_icon_2"
        app:layout_constraintBottom_toTopOf="@id/hotseat_icon_4"
        app:layout_constraintStart_toStartOf="parent"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_4"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_4"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toBottomOf="@id/hotseat_icon_3"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+123 −0
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.
-->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="32dp"
    android:paddingStart="@dimen/gesture_tutorial_hotseat_padding_start_end"
    android:paddingEnd="@dimen/gesture_tutorial_hotseat_padding_start_end">

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_search_bar"
        android:layout_width="200dp"
        android:layout_height="@dimen/gesture_tutorial_hotseat_search_height"

        app:layout_constraintHorizontal_chainStyle="spread_inside"
        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_search_corner_radius"
        app:cardBackgroundColor="@color/mock_search_bar"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_1"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_1"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_1"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_search_bar"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_2"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_2"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_2"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_icon_1"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_3"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_3"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_3"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_icon_2"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_4"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_4"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_1"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_icon_3"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_5"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_5"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_4"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_icon_4"
        app:layout_constraintEnd_toStartOf="@id/hotseat_icon_6"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_icon_6"
        android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size"
        android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size"

        app:cardElevation="0dp"
        app:cardCornerRadius="@dimen/gesture_tutorial_hotseat_icon_corner_radius"
        app:cardBackgroundColor="@color/mock_app_icon_2"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/hotseat_icon_5"
        app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+3 −4
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@

            <TextView
                android:id="@+id/title"
                style="@style/TextAppearance.GestureTutorial.Feedback.Title"
                style="@style/TextAppearance.GestureTutorial.Feedback.Title.AllSet"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/allset_title_margin_top"
@@ -71,15 +71,14 @@

            <TextView
                android:id="@+id/subtitle"
                style="@style/TextAppearance.GestureTutorial.Feedback.Subtitle"
                style="@style/TextAppearance.GestureTutorial.Feedback.Subtitle.AllSet"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/allset_subtitle_margin_top"
                app:layout_constraintTop_toBottomOf="@id/title"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintWidth_max="@dimen/allset_subtitle_width_max"
                android:gravity="start"
                android:text="@string/allset_description"/>
                android:gravity="start"/>

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/navigation_settings_guideline_bottom"
+16 −2
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.
-->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="32dp"
    android:paddingStart="170dp"
    android:paddingEnd="170dp">
    android:paddingStart="@dimen/gesture_tutorial_hotseat_padding_start_end"
    android:paddingEnd="@dimen/gesture_tutorial_hotseat_padding_start_end">

    <androidx.cardview.widget.CardView
        android:id="@+id/hotseat_search_bar"
Loading