1<?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" 28 android:elevation="4dp"> 29 <androidx.cardview.widget.CardView 30 android:id="@+id/search_bar" 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:layout_margin="@dimen/search_bar_margin" 34 app:cardCornerRadius="2dp" 35 app:cardElevation="2dp"> 36 <Toolbar 37 android:id="@+id/search_toolbar" 38 android:layout_width="match_parent" 39 android:layout_height="@dimen/search_bar_height" 40 android:background="?android:attr/selectableItemBackground" 41 android:contentInsetStart="0dp" 42 android:contentInsetStartWithNavigation="0dp" 43 android:theme="?android:attr/actionBarTheme"> 44 <SearchView 45 android:id="@+id/search_view" 46 android:layout_width="match_parent" 47 android:layout_height="match_parent" 48 android:iconifiedByDefault="false" 49 android:imeOptions="actionSearch|flagNoExtractUi" 50 android:searchIcon="@null"/> 51 </Toolbar> 52 </androidx.cardview.widget.CardView> 53 </FrameLayout> 54 55 <FrameLayout 56 android:id="@+id/layout_results" 57 android:layout_width="match_parent" 58 android:layout_height="0dp" 59 android:layout_weight="1" 60 android:orientation="vertical"> 61 62 <!-- Padding is included in the background --> 63 <androidx.recyclerview.widget.RecyclerView 64 android:id="@+id/list_results" 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content" 67 android:paddingStart="@dimen/dashboard_padding_start" 68 android:paddingEnd="@dimen/dashboard_padding_end" 69 android:paddingTop="@dimen/dashboard_padding_top" 70 android:paddingBottom="@dimen/dashboard_padding_bottom" 71 android:scrollbarStyle="outsideOverlay" 72 android:scrollbars="vertical"/> 73 74 <LinearLayout 75 android:id="@+id/no_results_layout" 76 android:layout_width="match_parent" 77 android:layout_height="match_parent" 78 android:paddingTop="35dp" 79 android:orientation="vertical" 80 android:visibility="gone"> 81 82 <Space 83 android:layout_width="match_parent" 84 android:layout_height="?android:attr/actionBarSize"/> 85 86 <ImageView 87 android:layout_height="wrap_content" 88 android:layout_width="wrap_content" 89 android:layout_gravity="center_horizontal" 90 android:src="@drawable/empty_search_results"/> 91 92 <TextView 93 android:layout_height="wrap_content" 94 android:layout_width="match_parent" 95 android:paddingTop="24dp" 96 android:textSize="18sp" 97 android:text="@string/search_no_results" 98 android:gravity="center"/> 99 100 </LinearLayout> 101 102 </FrameLayout> 103 104 <include layout="@layout/search_feedback"/> 105 106</LinearLayout>