diff options
author | Adam Cohen <adamcohen@google.com> | 2011-01-21 18:16:23 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-21 18:16:23 -0800 |
commit | 49d3e93f13b340b9251b2576b19c94309db5d69e (patch) | |
tree | 3be8079a22a865ceb5f9554be384aa52b8421678 /core | |
parent | da5022a6e052c1d0ef57399cc2afe3ae60075b69 (diff) | |
parent | 65eea842aff04f3949006315ffef5e7228f98051 (diff) | |
download | frameworks_base-49d3e93f13b340b9251b2576b19c94309db5d69e.zip frameworks_base-49d3e93f13b340b9251b2576b19c94309db5d69e.tar.gz frameworks_base-49d3e93f13b340b9251b2576b19c94309db5d69e.tar.bz2 |
am 65eea842: am a049fe95: Merge "Fixing a couple StackView bugs:" into honeycomb
* commit '65eea842aff04f3949006315ffef5e7228f98051':
Fixing a couple StackView bugs:
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/AdapterViewAnimator.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/StackView.java | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/widget/AdapterViewAnimator.java b/core/java/android/widget/AdapterViewAnimator.java index 6eb06ad..e34a204 100644 --- a/core/java/android/widget/AdapterViewAnimator.java +++ b/core/java/android/widget/AdapterViewAnimator.java @@ -696,6 +696,8 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> mWhichChild = 0; showOnly(mWhichChild, true); + } else if (mOldItemCount != getCount()) { + showOnly(mWhichChild, true); } refreshChildren(); requestLayout(); diff --git a/core/java/android/widget/StackView.java b/core/java/android/widget/StackView.java index 9ec4b74..03c073c 100644 --- a/core/java/android/widget/StackView.java +++ b/core/java/android/widget/StackView.java @@ -454,9 +454,13 @@ public class StackView extends AdapterViewAnimator { canvas.getClipBounds(stackInvalidateRect); final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { - LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); + final View child = getChildAt(i); + LayoutParams lp = (LayoutParams) child.getLayoutParams(); + if ((lp.horizontalOffset == 0 && lp.verticalOffset == 0) || + child.getAlpha() == 0f || child.getVisibility() != VISIBLE) { + lp.resetInvalidateRect(); + } stackInvalidateRect.union(lp.getInvalidateRect()); - lp.resetInvalidateRect(); } canvas.save(Canvas.CLIP_SAVE_FLAG); canvas.clipRect(stackInvalidateRect, Region.Op.UNION); |