Removing custom dispatchDraw logic and letting the system handle

selecting appropriate children for drawing.

> System already skips children which are outside the bounds. Originally
this logic was added because workspace layout is larger than the screen, and
we need to selectivly skip more children. But over time we have added many
special conditions and at present workspace actually draws more children than
needed at any given time.
> Fixing bug, where onBeginPageMoving was getting called during folder open

Bug: 12116740
Change-Id: Idee18ee9cd9d348ebc4dfd82f4ff6df14e0d22d2
This commit is contained in:
Sunny Goyal
2016-10-26 13:06:08 -07:00
parent 35fe7be54e
commit 9ccafbff26
4 changed files with 90 additions and 203 deletions

View File

@@ -524,12 +524,11 @@ public class FolderPagedView extends PagedView {
}
@Override
protected void onPageBeginMoving() {
super.onPageBeginMoving();
getVisiblePages(sTempPosArray);
for (int i = sTempPosArray[0]; i <= sTempPosArray[1]; i++) {
verifyVisibleHighResIcons(i);
}
protected void onPageBeginTransition() {
super.onPageBeginTransition();
// Ensure that adjacent pages have high resolution icons
verifyVisibleHighResIcons(getCurrentPage() - 1);
verifyVisibleHighResIcons(getCurrentPage() + 1);
}
/**