Merge "Fix regression which was causing requestLayout in layout pass" into ub-now-porkchop
This commit is contained in:
@@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user