am 67ef1c40: Merge "Fix regression which was causing requestLayout in layout pass" into ub-now-porkchop

* commit '67ef1c406cb8a288c5bcdb825a26e6020e0a6cac':
  Fix regression which was causing requestLayout in layout pass
This commit is contained in:
Adam Cohen
2014-08-28 23:05:42 +00:00
committed by Android Git Automerger
3 changed files with 9 additions and 5 deletions
@@ -68,4 +68,4 @@ public class AppsCustomizeCellLayout extends CellLayout implements Page {
children.getChildAt(j).setOnKeyListener(null);
}
}
}
}
@@ -362,8 +362,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
if (!isDataReady()) {
if ((LauncherAppState.isDisableAllApps() || !mApps.isEmpty()) && !mWidgets.isEmpty()) {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
post(new Runnable() {
// This code triggers requestLayout so must be posted outside of the
// layout pass.
public void run() {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
}
});
}
}
}
-2
View File
@@ -996,9 +996,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < getChildCount()) {
setHorizontalScrollBarEnabled(false);
updateCurrentPageScroll();
setHorizontalScrollBarEnabled(true);
mFirstLayout = false;
}