diff options
| author | 2011-01-27 20:06:09 -0800 | |
|---|---|---|
| committer | 2011-01-27 20:06:09 -0800 | |
| commit | aed413a18cac6b39d5e88c53b08bdb019ebb6d8d (patch) | |
| tree | fab5490e8db054f531778ceccba013a1f731bba7 | |
| parent | fb80d648e2164fac75d41d6024a4d43137c0561f (diff) | |
| parent | e31ecf61042171242e6f31f22df7691c40f189b2 (diff) | |
am e31ecf61: Merge "Fixing static StackView scenario (Issue: 3399844)" into honeycomb
* commit 'e31ecf61042171242e6f31f22df7691c40f189b2':
Fixing static StackView scenario (Issue: 3399844)
| -rw-r--r-- | core/java/android/widget/StackView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/widget/StackView.java b/core/java/android/widget/StackView.java index 7a74241e1bdf..6a09d3548e79 100644 --- a/core/java/android/widget/StackView.java +++ b/core/java/android/widget/StackView.java @@ -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) { |