• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2    Copyright (C) 2020 The Android Open Source Project
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8         http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15-->
16<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    android:layout_width="match_parent"
18    android:layout_height="match_parent"
19    android:background="?android:attr/colorBackground">
20
21    <View
22        android:id="@+id/gesture_tutorial_ripple_view"
23        android:layout_width="match_parent"
24        android:layout_height="match_parent"
25        android:background="@drawable/gesture_tutorial_ripple"/>
26
27    <com.android.launcher3.views.ClipIconView
28        android:id="@+id/gesture_tutorial_fake_icon_view"
29        android:layout_width="20dp"
30        android:layout_height="20dp"
31        android:background="@drawable/bg_circle"
32        android:backgroundTint="@color/gesture_tutorial_fake_task_view_color"
33        android:visibility="invisible" />
34
35    <View
36        android:id="@+id/gesture_tutorial_fake_task_view"
37        android:layout_width="match_parent"
38        android:layout_height="match_parent"
39        android:background="@color/gesture_tutorial_fake_task_view_color"
40        android:visibility="invisible" />
41
42    <ImageView
43        android:id="@+id/gesture_tutorial_fragment_hand_coaching"
44        android:layout_width="match_parent"
45        android:layout_height="match_parent"
46        android:scaleType="centerCrop"/>
47
48    <ImageButton
49        android:id="@+id/gesture_tutorial_fragment_close_button"
50        android:layout_width="wrap_content"
51        android:layout_height="wrap_content"
52        android:layout_alignParentStart="true"
53        android:layout_alignParentTop="true"
54        android:layout_marginStart="4dp"
55        android:layout_marginTop="30dp"
56        android:accessibilityTraversalAfter="@id/gesture_tutorial_fragment_titles_container"
57        android:background="@android:color/transparent"
58        android:contentDescription="@string/gesture_tutorial_close_button_content_description"
59        android:padding="18dp"
60        android:src="@drawable/gesture_tutorial_close_button"
61        android:tint="?android:attr/textColorPrimary"/>
62
63    <LinearLayout
64        android:id="@+id/gesture_tutorial_fragment_titles_container"
65        android:layout_width="match_parent"
66        android:layout_height="wrap_content"
67        android:layout_alignParentTop="true"
68        android:layout_marginTop="70dp"
69        android:focusable="true"
70        android:gravity="center_horizontal"
71        android:orientation="vertical">
72
73        <TextView
74            android:id="@+id/gesture_tutorial_fragment_title_view"
75            style="@style/TextAppearance.GestureTutorial.Title"
76            android:layout_width="wrap_content"
77            android:layout_height="wrap_content"
78            android:layout_marginStart="@dimen/gesture_tutorial_title_margin_start_end"
79            android:layout_marginEnd="@dimen/gesture_tutorial_title_margin_start_end"/>
80
81        <TextView
82            android:id="@+id/gesture_tutorial_fragment_subtitle_view"
83            style="@style/TextAppearance.GestureTutorial.Subtitle"
84            android:layout_width="wrap_content"
85            android:layout_height="wrap_content"
86            android:layout_marginStart="@dimen/gesture_tutorial_subtitle_margin_start_end"
87            android:layout_marginTop="10dp"
88            android:layout_marginEnd="@dimen/gesture_tutorial_subtitle_margin_start_end"/>
89    </LinearLayout>
90
91    <TextView
92        android:id="@+id/gesture_tutorial_fragment_feedback_view"
93        style="@style/TextAppearance.GestureTutorial.Feedback"
94        android:layout_width="wrap_content"
95        android:layout_height="wrap_content"
96        android:layout_above="@id/gesture_tutorial_fragment_action_button"
97        android:layout_centerHorizontal="true"
98        android:layout_marginStart="@dimen/gesture_tutorial_feedback_margin_start_end"
99        android:layout_marginEnd="@dimen/gesture_tutorial_feedback_margin_start_end"
100        android:layout_marginBottom="10dp"/>
101
102    <!-- android:stateListAnimator="@null" removes shadow and normal on click behavior (increase
103         of elevation and shadow) which is replaced by ripple effect in android:foreground -->
104    <Button
105        android:id="@+id/gesture_tutorial_fragment_action_button"
106        style="@style/TextAppearance.GestureTutorial.ButtonLabel"
107        android:layout_width="142dp"
108        android:layout_height="49dp"
109        android:layout_alignParentEnd="true"
110        android:layout_alignParentBottom="true"
111        android:layout_marginEnd="@dimen/gesture_tutorial_button_margin_start_end"
112        android:layout_marginBottom="48dp"
113        android:background="@drawable/gesture_tutorial_action_button_background"
114        android:foreground="?android:attr/selectableItemBackgroundBorderless"
115        android:stateListAnimator="@null"/>
116
117    <Button
118        android:id="@+id/gesture_tutorial_fragment_action_text_button"
119        style="@style/TextAppearance.GestureTutorial.TextButtonLabel"
120        android:layout_width="142dp"
121        android:layout_height="49dp"
122        android:layout_alignParentStart="true"
123        android:layout_alignParentBottom="true"
124        android:layout_marginStart="@dimen/gesture_tutorial_button_margin_start_end"
125        android:layout_marginBottom="48dp"
126        android:background="@null"
127        android:foreground="?android:attr/selectableItemBackgroundBorderless"
128        android:stateListAnimator="@null"/>
129</RelativeLayout>