diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-16 15:18:40 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-16 15:18:44 -0700 |
commit | dbe9a8c18bec55943c2239f1381774a6a4ba2a59 (patch) | |
tree | fb7d15a169a321bd760e0795a255f48f41749801 | |
parent | 7a67eab3a6e5e323934f12819eba9a72a604916f (diff) |
Fix fragment position in dialpad fade-out.
Before, there's a noticeable gap in the bottom where the search
fragment is not fading in; it's fully transparent because the
position of the fragment was formerly updated too late. This
change updates the position earlier and tweaks the logic slightly.
Change-Id: I748c5cd9e9161007eccedb8f86d30011f2a30150
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index d888de6fe..ef1db3968 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -587,6 +587,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mIsDialpadShown = false; mDialpadFragment.setAnimate(animate); + updateSearchFragmentPosition(); updateFloatingActionButton(); if (animate) { Animation slideOut = AnimationUtils.loadAnimation(this, R.anim.slide_out); @@ -601,7 +602,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O commitDialpadFragmentHide(); } - updateSearchFragmentPosition(); mListsFragment.maybeShowActionBar(); } @@ -617,9 +617,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O private void updateSearchFragmentPosition() { int translationValue = mIsDialpadShown ? -mActionBarHeight : 0; SearchFragment fragment = null; - if (mInDialpadSearch) { + if (mSmartDialSearchFragment != null && mSmartDialSearchFragment.isVisible()) { fragment = mSmartDialSearchFragment; - } else if (mInRegularSearch) { + } else if (mRegularSearchFragment != null && mRegularSearchFragment.isVisible()) { fragment = mRegularSearchFragment; } if (fragment != null && fragment.isVisible()) { |