Raff Tsai | 082f8ee | 2018-06-29 06:11:39 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Copyright (C) 2018 The Android Open Source Project |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 18 | <com.google.android.material.card.MaterialCardView |
Raff Tsai | 082f8ee | 2018-06-29 06:11:39 +0000 | [diff] [blame] | 19 | xmlns:android="http://schemas.android.com/apk/res/android" |
Raff Tsai | 00d42c5 | 2018-07-12 17:32:46 +0800 | [diff] [blame] | 20 | xmlns:app="http://schemas.android.com/apk/res-auto" |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 21 | android:id="@+id/search_bar" |
| 22 | style="@style/SearchBarStyle" |
Raff Tsai | 082f8ee | 2018-06-29 06:11:39 +0000 | [diff] [blame] | 23 | android:layout_width="match_parent" |
| 24 | android:layout_height="wrap_content" |
Salvador Martinez | 2bb9930 | 2018-11-02 14:15:44 -0700 | [diff] [blame] | 25 | app:layout_scrollFlags="scroll|enterAlways"> |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 26 | <Toolbar |
| 27 | android:id="@+id/search_action_bar" |
Raff Tsai | 082f8ee | 2018-06-29 06:11:39 +0000 | [diff] [blame] | 28 | android:layout_width="match_parent" |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 29 | android:layout_height="@dimen/search_bar_height" |
Sunny Shao | 6491db8 | 2019-03-05 13:56:07 +0800 | [diff] [blame] | 30 | android:layout_marginStart="-2dp" |
Yanting Yang | 21f9a0f | 2019-04-11 23:30:31 +0800 | [diff] [blame] | 31 | android:background="@drawable/search_bar_selected_background" |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 32 | android:contentInsetStartWithNavigation="@dimen/search_bar_content_inset" |
Sunny Shao | 3f735ff | 2019-01-17 17:41:05 +0800 | [diff] [blame] | 33 | android:navigationIcon="@drawable/ic_homepage_search"> |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 34 | <TextView |
| 35 | android:id="@+id/search_action_bar_title" |
| 36 | style="@style/TextAppearance.SearchBar" |
| 37 | android:layout_width="wrap_content" |
| 38 | android:layout_height="wrap_content" |
| 39 | android:text="@string/search_menu"/> |
| 40 | </Toolbar> |
| 41 | <ImageView |
| 42 | android:id="@+id/account_avatar" |
Sunny Shao | c878640 | 2019-02-20 18:06:37 +0800 | [diff] [blame] | 43 | android:paddingEnd="@dimen/search_bar_avatar_end_padding" |
| 44 | android:paddingTop="@dimen/search_bar_avatar_top_bottom_padding" |
| 45 | android:paddingBottom="@dimen/search_bar_avatar_top_bottom_padding" |
| 46 | android:layout_width="@dimen/search_bar_avatar_width" |
| 47 | android:layout_height="@dimen/search_bar_height" |
| 48 | android:layout_gravity="end" |
Sunny Shao | 6c403a8 | 2018-12-14 11:17:07 +0800 | [diff] [blame] | 49 | android:contentDescription="@string/search_bar_account_avatar_content_description"/> |
Sunny Shao | 86b1c7d | 2018-11-27 16:29:38 +0800 | [diff] [blame] | 50 | </com.google.android.material.card.MaterialCardView> |