Merge "Fixing static StackView scenario (Issue: 3399844)" into honeycomb

This commit is contained in:
Adam Cohen
2011-01-27 20:04:21 -08:00
committed by Android (Google) Code Review

View File

@@ -546,12 +546,16 @@ public class StackView extends AdapterViewAnimator {
private void onLayout() {
if (!mFirstLayoutHappened) {
mSlideAmount = Math.round(SLIDE_UP_RATIO * getMeasuredHeight());
mSwipeThreshold = Math.round(SWIPE_THRESHOLD_RATIO * mSlideAmount);
mFirstLayoutHappened = true;
updateChildTransforms();
}
final int newSlideAmount = Math.round(SLIDE_UP_RATIO * getMeasuredHeight());
if (mSlideAmount != newSlideAmount) {
mSlideAmount = newSlideAmount;
mSwipeThreshold = Math.round(SWIPE_THRESHOLD_RATIO * newSlideAmount);
}
if (Float.compare(mPerspectiveShiftY, mNewPerspectiveShiftY) != 0 ||
Float.compare(mPerspectiveShiftX, mNewPerspectiveShiftX) != 0) {