Merge "Fixing a couple StackView bugs:" into honeycomb
This commit is contained in:
@@ -695,6 +695,8 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
|
||||
if (mWhichChild >= getWindowSize()) {
|
||||
mWhichChild = 0;
|
||||
|
||||
showOnly(mWhichChild, true);
|
||||
} else if (mOldItemCount != getCount()) {
|
||||
showOnly(mWhichChild, true);
|
||||
}
|
||||
refreshChildren();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user