1<?xml version="1.0" encoding="utf-8"?>
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<com.android.launcher3.secondarydisplay.SecondaryDragLayer
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    android:layout_width="match_parent"
19    android:layout_height="match_parent"
20    android:id="@+id/drag_layer"
21    android:padding="@dimen/dynamic_grid_edge_margin">
22
23    <GridView
24        android:layout_width="match_parent"
25        android:layout_height="match_parent"
26        android:layout_marginBottom="100dp"
27        android:theme="@style/HomeScreenElementTheme"
28        android:layout_gravity="center_horizontal|top"
29        android:layout_margin="@dimen/dynamic_grid_edge_margin"
30        android:id="@+id/workspace_grid" />
31
32    <ImageButton
33        android:id="@+id/all_apps_button"
34        android:layout_width="wrap_content"
35        android:layout_height="wrap_content"
36        android:layout_gravity="bottom|end"
37        android:layout_margin="40dp"
38        android:padding="16dp"
39        android:src="@drawable/ic_apps"
40        android:background="@drawable/bg_all_apps_button"
41        android:contentDescription="@string/all_apps_button_label"
42        android:onClick="onAppsButtonClicked" />
43
44    <com.android.launcher3.allapps.AllAppsContainerView
45        android:id="@+id/apps_view"
46        android:layout_width="match_parent"
47        android:layout_height="match_parent"
48        android:clipChildren="true"
49        android:clipToPadding="false"
50        android:focusable="false"
51        android:saveEnabled="false"
52        android:layout_gravity="bottom|end"
53        android:background="@drawable/round_rect_primary"
54        android:elevation="2dp"
55        android:visibility="invisible" >
56
57        <include
58            layout="@layout/all_apps_rv_layout"
59            android:visibility="gone" />
60
61        <com.android.launcher3.allapps.FloatingHeaderView
62            android:id="@+id/all_apps_header"
63            android:layout_width="match_parent"
64            android:layout_height="wrap_content"
65            android:layout_below="@id/search_container_all_apps"
66            android:clipToPadding="false"
67            android:paddingTop="@dimen/all_apps_header_top_padding"
68            android:orientation="vertical" >
69
70            <com.android.launcher3.allapps.PersonalWorkSlidingTabStrip
71                android:id="@+id/tabs"
72                android:layout_width="match_parent"
73                android:layout_height="@dimen/all_apps_header_tab_height"
74                android:layout_marginLeft="@dimen/all_apps_tabs_side_padding"
75                android:layout_marginRight="@dimen/all_apps_tabs_side_padding"
76                android:orientation="horizontal"
77                style="@style/TextHeadline">
78
79                <Button
80                    android:id="@+id/tab_personal"
81                    android:layout_width="0dp"
82                    android:layout_height="match_parent"
83                    android:layout_weight="1"
84                    android:background="?android:attr/selectableItemBackground"
85                    android:text="@string/all_apps_personal_tab"
86                    android:textAllCaps="true"
87                    android:textColor="@color/all_apps_tab_text"
88                    android:textSize="14sp" />
89
90                <Button
91                    android:id="@+id/tab_work"
92                    android:layout_width="0dp"
93                    android:layout_height="match_parent"
94                    android:layout_weight="1"
95                    android:background="?android:attr/selectableItemBackground"
96                    android:text="@string/all_apps_work_tab"
97                    android:textAllCaps="true"
98                    android:textColor="@color/all_apps_tab_text"
99                    android:textSize="14sp" />
100            </com.android.launcher3.allapps.PersonalWorkSlidingTabStrip>
101        </com.android.launcher3.allapps.FloatingHeaderView>
102
103        <com.android.launcher3.allapps.search.AppsSearchContainerLayout
104            android:id="@id/search_container_all_apps"
105            android:layout_width="match_parent"
106            android:layout_height="@dimen/all_apps_search_bar_field_height"
107            android:layout_centerHorizontal="true"
108            android:layout_gravity="top|center_horizontal"
109            android:background="@drawable/bg_all_apps_searchbox"
110            android:elevation="1dp"
111            android:focusableInTouchMode="true"
112            android:gravity="center"
113            android:hint="@string/all_apps_search_bar_hint"
114            android:imeOptions="actionSearch|flagNoExtractUi"
115            android:inputType="text|textNoSuggestions|textCapWords"
116            android:maxLines="1"
117            android:padding="8dp"
118            android:saveEnabled="false"
119            android:scrollHorizontally="true"
120            android:singleLine="true"
121            android:textColor="?android:attr/textColorSecondary"
122            android:textColorHint="@drawable/all_apps_search_hint"
123            android:textSize="16sp" />
124
125        <include layout="@layout/all_apps_fast_scroller" />
126    </com.android.launcher3.allapps.AllAppsContainerView>
127</com.android.launcher3.secondarydisplay.SecondaryDragLayer>