blob: 420c965a19b466c52cc3f6bec1299122b05d3244 [file] [log] [blame]
Raff Tsai082f8ee2018-06-29 06:11:39 +00001<?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 Shao86b1c7d2018-11-27 16:29:38 +080018<com.google.android.material.card.MaterialCardView
Raff Tsai082f8ee2018-06-29 06:11:39 +000019 xmlns:android="http://schemas.android.com/apk/res/android"
Raff Tsai00d42c52018-07-12 17:32:46 +080020 xmlns:app="http://schemas.android.com/apk/res-auto"
Sunny Shao86b1c7d2018-11-27 16:29:38 +080021 android:id="@+id/search_bar"
22 style="@style/SearchBarStyle"
Raff Tsai082f8ee2018-06-29 06:11:39 +000023 android:layout_width="match_parent"
24 android:layout_height="wrap_content"
Salvador Martinez2bb99302018-11-02 14:15:44 -070025 app:layout_scrollFlags="scroll|enterAlways">
Sunny Shao86b1c7d2018-11-27 16:29:38 +080026 <Toolbar
27 android:id="@+id/search_action_bar"
Raff Tsai082f8ee2018-06-29 06:11:39 +000028 android:layout_width="match_parent"
Sunny Shao86b1c7d2018-11-27 16:29:38 +080029 android:layout_height="@dimen/search_bar_height"
Sunny Shao6491db82019-03-05 13:56:07 +080030 android:layout_marginStart="-2dp"
Yanting Yang21f9a0f2019-04-11 23:30:31 +080031 android:background="@drawable/search_bar_selected_background"
Sunny Shao86b1c7d2018-11-27 16:29:38 +080032 android:contentInsetStartWithNavigation="@dimen/search_bar_content_inset"
Sunny Shao3f735ff2019-01-17 17:41:05 +080033 android:navigationIcon="@drawable/ic_homepage_search">
Sunny Shao86b1c7d2018-11-27 16:29:38 +080034 <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 Shaoc8786402019-02-20 18:06:37 +080043 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 Shao6c403a82018-12-14 11:17:07 +080049 android:contentDescription="@string/search_bar_account_avatar_content_description"/>
Sunny Shao86b1c7d2018-11-27 16:29:38 +080050</com.google.android.material.card.MaterialCardView>