diff options
author | Yorke Lee <yorkelee@google.com> | 2014-05-30 20:54:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-30 20:54:05 +0000 |
commit | a636ada9b053f1baad6c5267b4afb80360418290 (patch) | |
tree | 47468f4c0d5dd55d67683dccb18e02fdab7c5bfc /src | |
parent | 988e60e77519429b20ead6d27938369e75084f1e (diff) | |
parent | c7aaa28a4400fc9c8b24bb7437f9b23d29155669 (diff) |
Merge "Toggle between elevation and 9-patch shadow in searchbox" into lmp-preview-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/widget/SearchEditTextLayout.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/dialer/widget/SearchEditTextLayout.java b/src/com/android/dialer/widget/SearchEditTextLayout.java index 311d2afd1..dbb2b22de 100644 --- a/src/com/android/dialer/widget/SearchEditTextLayout.java +++ b/src/com/android/dialer/widget/SearchEditTextLayout.java @@ -16,13 +16,10 @@ package com.android.dialer.widget; -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.content.Context; import android.util.AttributeSet; -import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.inputmethod.InputMethodManager; @@ -41,6 +38,8 @@ public class SearchEditTextLayout extends FrameLayout { private int mLeftMargin; private int mRightMargin; + private float mCollapsedElevation; + /* Subclass-visible for testing */ protected boolean mIsExpanded = false; protected boolean mIsFadedOut = false; @@ -80,6 +79,8 @@ public class SearchEditTextLayout extends FrameLayout { mLeftMargin = params.leftMargin; mRightMargin = params.rightMargin; + mCollapsedElevation = getElevation(); + mCollapsed = findViewById(R.id.search_box_collapsed); mExpanded = findViewById(R.id.search_box_expanded); mSearchView = (EditText) mExpanded.findViewById(R.id.search_view); @@ -160,6 +161,7 @@ public class SearchEditTextLayout extends FrameLayout { } setBackgroundResource(R.drawable.search_shadow); + setElevation(0); if (requestFocus) { mSearchView.requestFocus(); } @@ -179,6 +181,7 @@ public class SearchEditTextLayout extends FrameLayout { } mIsExpanded = false; + setElevation(mCollapsedElevation); setBackgroundResource(R.drawable.rounded_corner); } |