summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/quickcontact/QuickContactActivity.java
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-06-30 18:44:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-26 18:35:29 +0000
commit8a43e7c99e1084f60bcf64528de96ce808946247 (patch)
tree384610a0d7c8d144945eec2ac462ff919873f824 /src/com/android/contacts/quickcontact/QuickContactActivity.java
parent6c4385d3ee02325f0e69cf8bb74d1c3351e3548c (diff)
parentac3ed8e48cc474448aa5a7cfed5d6b95073b84f9 (diff)
downloadpackages_apps_Contacts-8a43e7c99e1084f60bcf64528de96ce808946247.tar.gz
packages_apps_Contacts-8a43e7c99e1084f60bcf64528de96ce808946247.tar.bz2
packages_apps_Contacts-8a43e7c99e1084f60bcf64528de96ce808946247.zip
Merge "Don't examine window width in MultiShrinScroller"
Diffstat (limited to 'src/com/android/contacts/quickcontact/QuickContactActivity.java')
-rw-r--r--src/com/android/contacts/quickcontact/QuickContactActivity.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 6581e109a..975ec65f2 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -374,17 +374,10 @@ public class QuickContactActivity extends ContactsActivity {
ObjectAnimator.ofInt(mWindowScrim, "alpha", 0, 0xFF).setDuration(duration).start();
}
- if (mScroller != null) {
- mScroller.initialize(mMultiShrinkScrollerListener);
- if (mHasAlreadyBeenOpened) {
- mScroller.setVisibility(View.VISIBLE);
- mScroller.setScroll(mScroller.getScrollNeededToBeFullScreen());
- } else {
- // mScroller needs to perform asynchronous measurements after initalize(), therefore
- // we can't mark this as GONE.
- mScroller.setVisibility(View.INVISIBLE);
- }
- }
+ mScroller.initialize(mMultiShrinkScrollerListener);
+ // mScroller needs to perform asynchronous measurements after initalize(), therefore
+ // we can't mark this as GONE.
+ mScroller.setVisibility(View.INVISIBLE);
setHeaderNameText(R.string.missing_name);
@@ -400,17 +393,24 @@ public class QuickContactActivity extends ContactsActivity {
if (savedInstanceState != null) {
final int color = savedInstanceState.getInt(KEY_THEME_COLOR, 0);
- if (color != 0) {
- // Wait for pre draw. Setting the header tint before the MultiShrinkScroller has
- // been measured will cause incorrect tinting calculations.
- SchedulingUtils.doOnPreDraw(mScroller, /* drawNextFrame = */ true,
- new Runnable() {
- @Override
- public void run() {
+ SchedulingUtils.doOnPreDraw(mScroller, /* drawNextFrame = */ false,
+ new Runnable() {
+ @Override
+ public void run() {
+ // Need to wait for the pre draw before setting the initial scroll
+ // value. Prior to pre draw all scroll values are invalid.
+ if (mHasAlreadyBeenOpened) {
+ mScroller.setVisibility(View.VISIBLE);
+ mScroller.setScroll(mScroller.getScrollNeededToBeFullScreen());
+ }
+ // Need to wait for pre draw for setting the theme color. Setting the
+ // header tint before the MultiShrinkScroller has been measured will
+ // cause incorrect tinting calculations.
+ if (color != 0) {
setThemeColor(color);
}
- });
- }
+ }
+ });
}
Trace.endSection();