From bcef940ebcd0b85d2acef46b28e6622ed596f569 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 21 May 2014 15:33:00 -0700 Subject: Add shadow to expanded search box Change-Id: I6fa3bdd20a4e1fe024e2edabc06d0f777571ae2c --- res/drawable-hdpi/search_shadow.9.png | Bin 0 -> 183 bytes res/drawable-mdpi/search_shadow.9.png | Bin 0 -> 159 bytes res/drawable-xhdpi/search_shadow.9.png | Bin 0 -> 198 bytes res/drawable-xxhdpi/search_shadow.9.png | Bin 0 -> 1148 bytes src/com/android/dialer/DialtactsActivity.java | 1 + src/com/android/dialer/widget/SearchEditTextLayout.java | 2 +- 6 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 res/drawable-hdpi/search_shadow.9.png create mode 100644 res/drawable-mdpi/search_shadow.9.png create mode 100644 res/drawable-xhdpi/search_shadow.9.png create mode 100644 res/drawable-xxhdpi/search_shadow.9.png diff --git a/res/drawable-hdpi/search_shadow.9.png b/res/drawable-hdpi/search_shadow.9.png new file mode 100644 index 000000000..3dc1c17f6 Binary files /dev/null and b/res/drawable-hdpi/search_shadow.9.png differ diff --git a/res/drawable-mdpi/search_shadow.9.png b/res/drawable-mdpi/search_shadow.9.png new file mode 100644 index 000000000..0c33905cd Binary files /dev/null and b/res/drawable-mdpi/search_shadow.9.png differ diff --git a/res/drawable-xhdpi/search_shadow.9.png b/res/drawable-xhdpi/search_shadow.9.png new file mode 100644 index 000000000..5667ab368 Binary files /dev/null and b/res/drawable-xhdpi/search_shadow.9.png differ diff --git a/res/drawable-xxhdpi/search_shadow.9.png b/res/drawable-xxhdpi/search_shadow.9.png new file mode 100644 index 000000000..ff55620d0 Binary files /dev/null and b/res/drawable-xxhdpi/search_shadow.9.png differ diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index c164294c7..8445ff76d 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -323,6 +323,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O final ActionBar actionBar = getActionBar(); actionBar.setCustomView(R.layout.search_edittext); actionBar.setDisplayShowCustomEnabled(true); + actionBar.setBackgroundDrawable(null); mSearchEditTextLayout = (SearchEditTextLayout) actionBar.getCustomView(); mSearchEditTextLayout.setPreImeKeyListener(mSearchEditTextLayoutListener); diff --git a/src/com/android/dialer/widget/SearchEditTextLayout.java b/src/com/android/dialer/widget/SearchEditTextLayout.java index 33bf09f59..683084211 100644 --- a/src/com/android/dialer/widget/SearchEditTextLayout.java +++ b/src/com/android/dialer/widget/SearchEditTextLayout.java @@ -122,7 +122,7 @@ public class SearchEditTextLayout extends FrameLayout { if (expand) { AnimationUtils.crossFadeViews(mExpanded, mCollapsed, ANIMATION_DURATION); animator = ValueAnimator.ofFloat(1f, 0f); - setBackgroundColor(mBackgroundColor); + setBackgroundResource(R.drawable.search_shadow); mSearchView.requestFocus(); } else { AnimationUtils.crossFadeViews(mCollapsed, mExpanded, ANIMATION_DURATION); -- cgit v1.2.3