diff options
author | calderwoodra <calderwoodra@google.com> | 2018-01-12 11:37:47 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-12 12:26:46 -0800 |
commit | aa280fa887ee877e6faff55ce3c1c406f113d559 (patch) | |
tree | 966b304cc0a46b6d7667a66d700f98ba1bd67367 /java/com/android/dialer/main/impl/toolbar/res/layout | |
parent | 9772be09602be30a0b4479dfe80ed2adb46f6fc3 (diff) |
Added search bar animations to NUI toolbar.
Bug: 181512198
Test: MainActivityIntegrationTest
PiperOrigin-RevId: 181771027
Change-Id: Id2b6d35cec928cbd2fed8ad75a9da007af9e826e
Diffstat (limited to 'java/com/android/dialer/main/impl/toolbar/res/layout')
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml | 13 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml | 20 |
2 files changed, 16 insertions, 17 deletions
diff --git a/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml b/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml index f814a766d..4dbd4bf22 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml @@ -17,14 +17,14 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/search_box_expanded" android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone"> + android:layout_height="wrap_content" + android:visibility="invisible"> <ImageButton android:id="@+id/search_back_button" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="16dp" + android:layout_marginStart="8dp" android:layout_centerVertical="true" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/action_menu_back_from_search" @@ -39,17 +39,19 @@ android:layout_toStartOf="@+id/search_close_button" android:layout_centerVertical="true" android:layout_marginStart="8dp" + android:minHeight="48dp" android:background="@null" android:imeOptions="flagNoExtractUi" android:inputType="textFilter" android:maxLines="1" + android:hint="@string/dialer_hint_find_contact" android:textColor="@color/dialer_secondary_text_color" android:textColorHint="@color/dialer_edit_text_hint_color" android:textCursorDrawable="@drawable/custom_cursor" android:textSize="16sp"/> <ImageView - android:id="@+id/search_close_button" + android:id="@+id/search_clear_button" android:layout_width="48dp" android:layout_height="48dp" android:layout_alignParentEnd="true" @@ -58,5 +60,6 @@ android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/description_clear_search" android:src="@drawable/quantum_ic_close_vd_theme_24" - android:tint="@color/dialer_secondary_text_color"/> + android:tint="@color/dialer_secondary_text_color" + android:visibility="gone"/> </RelativeLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml index 27b37e80f..9b0086b38 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml @@ -22,25 +22,21 @@ android:minHeight="?attr/actionBarSize" android:background="@color/dialer_theme_color" app:contentInsetStart="0dp" - app:contentInsetEnd="0dp" - app:theme="@style/ThemeOverlay.AppCompat.Light"> + app:contentInsetEnd="0dp"> <com.android.dialer.main.impl.toolbar.SearchBarView android:id="@+id/search_view_container" android:layout_width="match_parent" - android:layout_height="48dp" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" - android:layout_marginEnd="8dp" + android:layout_height="wrap_content" + android:layout_margin="@dimen/search_bar_margin" android:background="@drawable/rounded_corner" - android:elevation="4dp" - android:theme="@style/Theme.AppCompat.Light"> + android:elevation="4dp"> <RelativeLayout android:id="@+id/search_box_collapsed" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" android:gravity="center_vertical"> @@ -58,12 +54,12 @@ <TextView android:id="@+id/search_box_start_search" android:layout_width="wrap_content" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_toEndOf="@+id/search_magnifying_glass" android:layout_toStartOf="@+id/voice_search_button" android:layout_marginStart="8dp" + android:layout_centerVertical="true" android:fontFamily="sans-serif" - android:gravity="center_vertical" android:hint="@string/dialer_hint_find_contact" android:textColorHint="@color/dialer_secondary_text_color" android:textSize="16dp"/> |