Loading src/com/android/contacts/widget/MultiShrinkScroller.java +12 −2 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ public class MultiShrinkScroller extends LinearLayout { private final int mMaximumTitleMargin; private final float mToolbarElevation; private final boolean mIsTwoPanel; private final int mActionBarSize; // Objects used to perform color filtering on the header. These are stored as fields for // the sole purpose of avoiding "new" operations inside animation loops. Loading Loading @@ -225,7 +226,8 @@ public class MultiShrinkScroller extends LinearLayout { final TypedArray attributeArray = context.obtainStyledAttributes( new int[]{android.R.attr.actionBarSize}); mMinimumHeaderHeight = attributeArray.getDimensionPixelSize(0, 0); mActionBarSize = attributeArray.getDimensionPixelSize(0, 0); mMinimumHeaderHeight = mActionBarSize; // This value is approximately equal to the portrait ActionBar size. It isn't exactly the // same, since the landscape and portrait ActionBar sizes can be different. mMinimumPortraitHeaderHeight = mMinimumHeaderHeight; Loading Loading @@ -303,7 +305,7 @@ public class MultiShrinkScroller extends LinearLayout { final FrameLayout.LayoutParams actionBarGradientLayoutParams = (FrameLayout.LayoutParams) mActionBarGradientView.getLayoutParams(); actionBarGradientLayoutParams.height = (int) (mMinimumHeaderHeight * GRADIENT_SIZE_COEFFICIENT); = (int) (mActionBarSize * GRADIENT_SIZE_COEFFICIENT); mActionBarGradientView.setLayoutParams(actionBarGradientLayoutParams); final FrameLayout.LayoutParams titleGradientLayoutParams = (FrameLayout.LayoutParams) mTitleGradientView.getLayoutParams(); Loading Loading @@ -907,6 +909,14 @@ public class MultiShrinkScroller extends LinearLayout { // available. Trace.beginSection("updatePhotoTintAndDropShadow"); if (mIsTwoPanel && !mPhotoView.isBasedOffLetterTile()) { // When in two panel mode, UX considers photo tinting unnecessary for non letter // tile photos. mTitleGradientDrawable.setAlpha(0xFF); mActionBarGradientDrawable.setAlpha(0xFF); return; } // We need to use toolbarLayoutParams to determine the height, since the layout // params can be updated before the height change is reflected inside the View#getHeight(). final int toolbarHeight = mToolbar.getLayoutParams().height; Loading Loading
src/com/android/contacts/widget/MultiShrinkScroller.java +12 −2 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ public class MultiShrinkScroller extends LinearLayout { private final int mMaximumTitleMargin; private final float mToolbarElevation; private final boolean mIsTwoPanel; private final int mActionBarSize; // Objects used to perform color filtering on the header. These are stored as fields for // the sole purpose of avoiding "new" operations inside animation loops. Loading Loading @@ -225,7 +226,8 @@ public class MultiShrinkScroller extends LinearLayout { final TypedArray attributeArray = context.obtainStyledAttributes( new int[]{android.R.attr.actionBarSize}); mMinimumHeaderHeight = attributeArray.getDimensionPixelSize(0, 0); mActionBarSize = attributeArray.getDimensionPixelSize(0, 0); mMinimumHeaderHeight = mActionBarSize; // This value is approximately equal to the portrait ActionBar size. It isn't exactly the // same, since the landscape and portrait ActionBar sizes can be different. mMinimumPortraitHeaderHeight = mMinimumHeaderHeight; Loading Loading @@ -303,7 +305,7 @@ public class MultiShrinkScroller extends LinearLayout { final FrameLayout.LayoutParams actionBarGradientLayoutParams = (FrameLayout.LayoutParams) mActionBarGradientView.getLayoutParams(); actionBarGradientLayoutParams.height = (int) (mMinimumHeaderHeight * GRADIENT_SIZE_COEFFICIENT); = (int) (mActionBarSize * GRADIENT_SIZE_COEFFICIENT); mActionBarGradientView.setLayoutParams(actionBarGradientLayoutParams); final FrameLayout.LayoutParams titleGradientLayoutParams = (FrameLayout.LayoutParams) mTitleGradientView.getLayoutParams(); Loading Loading @@ -907,6 +909,14 @@ public class MultiShrinkScroller extends LinearLayout { // available. Trace.beginSection("updatePhotoTintAndDropShadow"); if (mIsTwoPanel && !mPhotoView.isBasedOffLetterTile()) { // When in two panel mode, UX considers photo tinting unnecessary for non letter // tile photos. mTitleGradientDrawable.setAlpha(0xFF); mActionBarGradientDrawable.setAlpha(0xFF); return; } // We need to use toolbarLayoutParams to determine the height, since the layout // params can be updated before the height change is reflected inside the View#getHeight(). final int toolbarHeight = mToolbar.getLayoutParams().height; Loading