mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
launcher: create paddings for foldables
This creates a new padding file that bring some foldables up to spec with VisD. For 2 panel layouts it now uses workspace margin instead of cell layout padding. Bug: 191879424 Fixes: 200035429 Test: checking paddings in HSV Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
This commit is contained in:
@@ -638,7 +638,10 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
private int getPageWidthSize(int widthSize) {
|
||||
return (widthSize - mInsets.left - mInsets.right) / getPanelCount();
|
||||
// It's necessary to add the padding back because it is remove when measuring children,
|
||||
// like when MeasureSpec.getSize in CellLayout.
|
||||
return (widthSize - mInsets.left - mInsets.right - getPaddingLeft() - getPaddingRight())
|
||||
/ getPanelCount() + getPaddingLeft() + getPaddingRight();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user