1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2015 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<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:app="http://schemas.android.com/apk/res-auto"
18    android:layout_height="match_parent"
19    android:layout_width="match_parent">
20
21    <ImageView
22        android:id="@+id/background"
23        android:layout_width="match_parent"
24        android:layout_height="match_parent"
25        android:scaleType="centerCrop" />
26
27    <android.car.ui.provider.CarDrawerLayout
28        android:id="@+id/drawer_container"
29        android:layout_width="match_parent"
30        android:layout_height="match_parent" >
31
32        <FrameLayout
33            android:id="@+id/container"
34            android:layout_width="match_parent"
35            android:layout_height="match_parent" />
36
37        <FrameLayout
38            android:id="@+id/drawer"
39            android:layout_width="match_parent"
40            android:layout_height="match_parent"
41            android:layout_gravity="left"
42            android:layout_marginEnd="96dp"
43            android:background="@color/car_card"
44            android:paddingTop="@dimen/car_drawer_header_height" >
45
46            <android.car.ui.provider.PagedListView
47                android:id="@+id/list_view"
48                android:layout_width="match_parent"
49                android:layout_height="match_parent"
50                android:paddingEnd="32dp" />
51
52            <ProgressBar
53                android:id="@+id/progress"
54                android:layout_width="48dp"
55                android:layout_height="48dp"
56                android:layout_gravity="center"
57                android:indeterminate="true" />
58
59            <android.support.v7.widget.CardView
60                android:id="@+id/truncated_list_card"
61                android:layout_width="match_parent"
62                android:layout_height="@dimen/car_list_truncated_list_card_height"
63                android:layout_gravity="bottom"
64                android:layout_marginLeft="@dimen/car_list_truncated_list_padding"
65                android:layout_marginRight="@dimen/car_list_truncated_list_padding"
66                android:layout_marginBottom="@dimen/car_list_truncated_list_padding"
67                android:visibility="gone"
68                app:cardBackgroundColor="@color/car_blue_grey_800"
69                app:cardCornerRadius="@dimen/car_card_view_corner_radius"
70                app:cardElevation="@dimen/car_card_view_elevation" >
71
72                <TextView
73                    style="@style/CarTruncatedList"
74                    android:layout_width="match_parent"
75                    android:layout_height="match_parent"
76                    android:paddingLeft="@dimen/car_list_truncated_list_icon_padding"
77                    android:drawablePadding="@dimen/car_list_truncated_list_drawable_padding"
78                    android:gravity="center_vertical"
79                    android:drawableLeft="@drawable/ic_remove_circle"
80                    android:text="@string/truncated_list" />
81
82            </android.support.v7.widget.CardView>
83        </FrameLayout>
84    </android.car.ui.provider.CarDrawerLayout>
85
86    <LinearLayout
87        android:layout_width="match_parent"
88        android:layout_height="@dimen/car_drawer_header_height">
89        <ImageView
90            android:id="@+id/car_drawer_button"
91            android:layout_width="@dimen/car_drawer_header_menu_button_size"
92            android:layout_height="@dimen/car_drawer_header_height"
93            android:background="@drawable/car_header_button_background"
94            android:focusable="false"
95            android:scaleType="center"
96            android:layout_gravity="left|top"
97            />
98        <FrameLayout
99            android:id="@+id/car_drawer_title_container"
100            android:layout_width="0dp"
101            android:layout_height="match_parent"
102            android:layout_weight="1" >
103            <TextView
104                android:id="@+id/car_drawer_title"
105                style="@style/CarTitle.Light"
106                android:layout_width="wrap_content"
107                android:layout_height="match_parent"
108                android:ellipsize="end"
109                android:focusable="false"
110                android:gravity="center_vertical"
111                android:singleLine="true"
112                />
113        </FrameLayout>
114        <android.support.v7.widget.CardView
115            android:id="@+id/car_search_box"
116            android:layout_width="0dp"
117            android:layout_height="match_parent"
118            android:layout_marginBottom="16dp"
119            android:layout_marginTop="16dp"
120            android:gravity="center_vertical"
121            app:cardBackgroundColor="@android:color/transparent" >
122
123            <FrameLayout
124                android:id="@+id/car_search_box_contents"
125                android:layout_width="match_parent"
126                android:layout_height="match_parent"
127                android:animateLayoutChanges="false">
128
129                <FrameLayout
130                    android:id="@+id/car_search_box_search_logo_container"
131                    android:layout_width="match_parent"
132                    android:layout_height="match_parent"
133                    android:paddingStart="16dp" >
134
135                    <ImageView
136                        android:id="@+id/car_search_box_search_logo"
137                        android:layout_width="wrap_content"
138                        android:layout_height="wrap_content"
139                        android:layout_gravity="start|center_vertical"
140                        android:paddingTop="6dp" />
141                </FrameLayout>
142
143                <LinearLayout
144                    android:layout_width="match_parent"
145                    android:layout_height="match_parent"
146                    android:orientation="horizontal">
147
148                    <ImageView
149                        android:id="@+id/car_search_box_super_logo"
150                        android:layout_width="@dimen/car_list_item_icon_size_small"
151                        android:layout_height="@dimen/car_list_item_icon_size_small"
152                        android:layout_gravity="center_vertical"
153                        android:layout_marginStart="24dp"
154                        android:scaleType="center" />
155                    <!--
156                        Use a 0x0 drawable for textSelectHandle; null drawable crashes, so does
157                        transparent color. Also set textCursorDrawable to null because this forces
158                        Android to render a cursor using the text color instead of not rendering
159                        one at all. See
160                        http://stackoverflow.com/questions/21397977/android-edit-text-cursor-is-not-visible
161                    -->
162
163                    <android.support.car.input.CarRestrictedEditText
164                        android:id="@+id/car_search_box_edit_text"
165                        style="@style/CarTitle.Dark"
166                        android:layout_width="0dp"
167                        android:layout_height="match_parent"
168                        android:layout_weight="1"
169                        android:gravity="center_vertical"
170                        android:imeOptions="actionSearch"
171                        android:paddingEnd="16dp"
172                        android:paddingStart="36dp"
173                        android:singleLine="true"
174                        android:textCursorDrawable="@null"
175                        android:textSelectHandle="@drawable/car_empty" />
176
177                    <FrameLayout
178                        android:id="@+id/car_search_box_end_view"
179                        android:layout_width="wrap_content"
180                        android:layout_height="match_parent" />
181                </LinearLayout>
182            </FrameLayout>
183        </android.support.v7.widget.CardView>
184    </LinearLayout>
185
186</FrameLayout>
187