OSDN Git Service

Merge changes from topic "am-b95e3cad-9610-4d9b-96a8-a82f585400e6" into oc-dev am...
[android-x86/packages-apps-Settings.git] / res / layout / search_panel.xml
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:background="@color/suggestion_condition_background">
29         <android.support.v7.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:cardBackgroundColor="?android:attr/colorBackground"
36             app:cardElevation="2dp">
37             <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>
53         </android.support.v7.widget.CardView>
54     </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 -->
64         <android.support.v7.widget.RecyclerView
65             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="96dp"
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_settings_no_results"
99                 android:gravity="center"/>
100
101         </LinearLayout>
102
103     </FrameLayout>
104
105     <include layout="@layout/search_feedback"/>
106
107 </LinearLayout>