blob: 82b1e1102b3f45c9f9d23f7497083edd808d18f9 [file] [log] [blame]
Fan Zhangd0eec412017-12-06 10:02:00 -08001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 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<LinearLayout
17 xmlns:android="http://schemas.android.com/apk/res/android"
18 xmlns:app="http://schemas.android.com/apk/res-auto"
19 android:id="@+id/search_panel"
20 android:layout_width="match_parent"
21 android:layout_height="match_parent"
22 android:orientation="vertical">
23
24 <FrameLayout
25 android:id="@+id/search_bar_container"
26 android:layout_width="match_parent"
27 android:layout_height="wrap_content"
Luca Stefani804cd352019-09-12 16:13:43 +020028 android:background="?android:attr/colorPrimary"
Fan Zhangd0eec412017-12-06 10:02:00 -080029 android:elevation="4dp">
Aravind Sreekumar62e15732018-04-10 12:15:45 -070030 <androidx.cardview.widget.CardView
Fan Zhangd0eec412017-12-06 10:02:00 -080031 android:id="@+id/search_bar"
32 android:layout_width="match_parent"
33 android:layout_height="wrap_content"
34 android:layout_margin="@dimen/search_bar_margin"
Luca Stefani804cd352019-09-12 16:13:43 +020035 app:cardCornerRadius="@*android:dimen/config_dialogCornerRadius"
36 app:cardElevation="3dp">
Fan Zhangd0eec412017-12-06 10:02:00 -080037 <Toolbar
38 android:id="@+id/search_toolbar"
39 android:layout_width="match_parent"
40 android:layout_height="@dimen/search_bar_height"
41 android:background="?android:attr/selectableItemBackground"
42 android:contentInsetStart="0dp"
43 android:contentInsetStartWithNavigation="0dp"
44 android:theme="?android:attr/actionBarTheme">
45 <SearchView
46 android:id="@+id/search_view"
47 android:layout_width="match_parent"
48 android:layout_height="match_parent"
49 android:iconifiedByDefault="false"
50 android:imeOptions="actionSearch|flagNoExtractUi"
51 android:searchIcon="@null"/>
52 </Toolbar>
Aravind Sreekumar62e15732018-04-10 12:15:45 -070053 </androidx.cardview.widget.CardView>
Fan Zhangd0eec412017-12-06 10:02:00 -080054 </FrameLayout>
55
56 <FrameLayout
57 android:id="@+id/layout_results"
58 android:layout_width="match_parent"
59 android:layout_height="0dp"
60 android:layout_weight="1"
61 android:orientation="vertical">
62
63 <!-- Padding is included in the background -->
Aravind Sreekumar62e15732018-04-10 12:15:45 -070064 <androidx.recyclerview.widget.RecyclerView
Fan Zhangd0eec412017-12-06 10:02:00 -080065 android:id="@+id/list_results"
66 android:layout_width="match_parent"
67 android:layout_height="wrap_content"
68 android:paddingStart="@dimen/dashboard_padding_start"
69 android:paddingEnd="@dimen/dashboard_padding_end"
70 android:paddingTop="@dimen/dashboard_padding_top"
71 android:paddingBottom="@dimen/dashboard_padding_bottom"
72 android:scrollbarStyle="outsideOverlay"
73 android:scrollbars="vertical"/>
74
75 <LinearLayout
76 android:id="@+id/no_results_layout"
77 android:layout_width="match_parent"
78 android:layout_height="match_parent"
79 android:paddingTop="35dp"
80 android:orientation="vertical"
81 android:visibility="gone">
82
83 <Space
84 android:layout_width="match_parent"
85 android:layout_height="?android:attr/actionBarSize"/>
86
87 <ImageView
88 android:layout_height="wrap_content"
89 android:layout_width="wrap_content"
90 android:layout_gravity="center_horizontal"
91 android:src="@drawable/empty_search_results"/>
92
93 <TextView
94 android:layout_height="wrap_content"
95 android:layout_width="match_parent"
96 android:paddingTop="24dp"
97 android:textSize="18sp"
98 android:text="@string/search_no_results"
99 android:gravity="center"/>
100
101 </LinearLayout>
102
103 </FrameLayout>
104
105 <include layout="@layout/search_feedback"/>
106
107</LinearLayout>