diff options
Diffstat (limited to 'java/com/android/dialer/main/impl/toolbar')
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/SearchBarView.java | 2 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml | 20 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml (renamed from java/com/android/dialer/main/impl/toolbar/res/drawable/rounded_corner.xml) | 0 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml | 2 |
4 files changed, 23 insertions, 1 deletions
diff --git a/java/com/android/dialer/main/impl/toolbar/SearchBarView.java b/java/com/android/dialer/main/impl/toolbar/SearchBarView.java index 37ffb9778..78cabf733 100644 --- a/java/com/android/dialer/main/impl/toolbar/SearchBarView.java +++ b/java/com/android/dialer/main/impl/toolbar/SearchBarView.java @@ -133,6 +133,7 @@ final class SearchBarView extends FrameLayout { searchBox.setText(text.get()); } searchBox.requestFocus(); + setBackgroundResource(R.drawable.search_bar_background); } }); animator.start(); @@ -164,6 +165,7 @@ final class SearchBarView extends FrameLayout { super.onAnimationEnd(animation); searchBox.setText(""); searchBoxExpanded.setVisibility(INVISIBLE); + setBackgroundResource(R.drawable.search_bar_background_rounded_corners); } }); animator.start(); diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml new file mode 100644 index 000000000..8767057a5 --- /dev/null +++ b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@color/background_dialer_white"/> +</shape> diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable/rounded_corner.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml index 58cdabe8b..58cdabe8b 100644 --- a/java/com/android/dialer/main/impl/toolbar/res/drawable/rounded_corner.xml +++ b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml 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 378b20f47..3ab20c1cf 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 @@ -28,7 +28,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/search_bar_margin" android:minHeight="@dimen/collapsed_search_bar_height" - android:background="@drawable/rounded_corner" + android:background="@drawable/search_bar_background_rounded_corners" android:elevation="4dp"> <RelativeLayout |