Files
lawnchair/quickstep/res/layout/gesture_tutorial_step_menu.xml
Marcelo Arteiro f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00

173 lines
8.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:theme="@style/GestureTutorialActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/materialColorSurfaceContainer"
android:fitsSystemWindows="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/gesture_tutorial_menu_padding_top"
android:paddingBottom="@dimen/gesture_tutorial_menu_padding_bottom"
android:paddingHorizontal="@dimen/gesture_tutorial_menu_padding_horizontal"
android:clipToPadding="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_home_button"
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:background="@drawable/gesture_tutorial_menu_home_button_background"
android:clipToOutline="true"
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/gesture_tutorial_menu_back_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_home_step_shape"
android:scaleType="fitXY"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Home"
android:id="@+id/gesture_tutorial_menu_home_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/home_gesture_tutorial_title"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_back_button"
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginTop="@dimen/gesture_tutorial_menu_button_spacing"
android:background="@drawable/gesture_tutorial_menu_back_button_background"
android:clipToOutline="true"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_menu_home_button"
app:layout_constraintBottom_toTopOf="@id/gesture_tutorial_menu_overview_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_back_step_shape"
android:scaleType="fitXY"
android:adjustViewBounds="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Back"
android:id="@+id/gesture_tutorial_menu_back_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/back_gesture_tutorial_title"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_overview_button"
android:layout_width="match_parent"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginTop="@dimen/gesture_tutorial_menu_button_spacing"
android:background="@drawable/gesture_tutorial_menu_overview_button_background"
android:clipToOutline="true"
app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_menu_back_button"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_overview_step_shape"
android:scaleType="fitXY"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Overview"
android:id="@+id/gesture_tutorial_menu_overview_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/overview_gesture_tutorial_title"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_end="@dimen/gesture_tutorial_menu_done_button_spacing"/>
<Button
style="@style/TextAppearance.GestureTutorial.ButtonLabel"
android:id="@+id/gesture_tutorial_menu_done_button"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginVertical="16dp"
android:text="@string/gesture_tutorial_action_button_label"
android:background="@drawable/gesture_tutorial_action_button_background"
android:backgroundTint="?attr/materialColorPrimary"
android:stateListAnimator="@null"
app:layout_constraintTop_toBottomOf="@id/guideline"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>