Refine search ui and avatar based on spec
This is the first version, we will keep tweaking the details later. Bug: 171278055 Test: Screenshot - https://screenshot.googleplex.com/ApRgDZknkvX9PWo Change-Id: Ie99cf9e187aa2440486cc2eae90e04287daf0a1d
This commit is contained in:
@@ -15,36 +15,43 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/search_bar"
|
||||
style="@style/SearchBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/search_bar_margin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
<Toolbar
|
||||
android:id="@+id/search_action_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_bar_height"
|
||||
android:layout_marginStart="-2dp"
|
||||
android:background="@drawable/search_bar_selected_background"
|
||||
android:contentInsetStartWithNavigation="@dimen/search_bar_content_inset"
|
||||
android:navigationIcon="@drawable/ic_homepage_search">
|
||||
<TextView
|
||||
android:id="@+id/search_action_bar_title"
|
||||
style="@style/TextAppearance.SearchBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/search_menu"/>
|
||||
</Toolbar>
|
||||
<ImageView
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/search_bar"
|
||||
style="@style/SearchBarStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
<Toolbar
|
||||
android:id="@+id/search_action_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_bar_height"
|
||||
android:layout_marginStart="-2dp"
|
||||
android:background="@drawable/search_bar_selected_background"
|
||||
android:contentInsetStartWithNavigation="@dimen/search_bar_content_inset"
|
||||
android:navigationIcon="@drawable/ic_homepage_search">
|
||||
<TextView
|
||||
android:id="@+id/search_action_bar_title"
|
||||
style="@style/TextAppearance.SearchBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/search_menu"/>
|
||||
</Toolbar>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/account_avatar"
|
||||
android:paddingEnd="@dimen/search_bar_avatar_end_padding"
|
||||
android:paddingTop="@dimen/search_bar_avatar_top_bottom_padding"
|
||||
android:paddingBottom="@dimen/search_bar_avatar_top_bottom_padding"
|
||||
android:layout_width="@dimen/search_bar_avatar_width"
|
||||
android:layout_height="@dimen/search_bar_height"
|
||||
android:layout_gravity="end"
|
||||
android:layout_width="@dimen/avatar_length"
|
||||
android:layout_height="@dimen/avatar_length"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/search_bar_account_avatar_content_description"/>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user