Two panel & two page swipe & currentPage fixes
- Pagespacing set to 0 to have similar design to figma - Added padding to left side of left panel and right side of right panel to match figma - getPageScrolls changed to support two page scrolling - validateNewPage changed so that only even indexed pages can be switched to - getPageWidthSize added for measurements, it returns half screen width when two panel is active - onMeasure changed to use getPageWidthSize - panelCount has been increased from 1 to 2 when two panel is active - add feature flag for two panel home - shouldConsumeTouch changed so not only currentpage is checked but currentpage+1 screen as well - add one more extra check for setDropLayoutForDragObject for currentpage + 2, next to right panel - using new grid option for two panel home screen Test: manual Bug: 174464115 Change-Id: I1bad7eecc67f65fb833608744a5aa5aca65373b4
This commit is contained in:
1 parent
2b30076aba
commit
8e57cce4ee
7 files changed
+129
-24
No files matched your search
@@ -251,7 +251,12 @@ public class DeviceProfile {
|
||||
int cellLayoutPadding = isScalableGrid
|
||||
? 0
|
||||
: res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_padding);
|
||||
if (isLandscape) {
|
||||
|
||||
if (FeatureFlags.ENABLE_TWO_PANEL_HOME.get() && isTablet) {
|
||||
cellLayoutPaddingLeftRightPx =
|
||||
res.getDimensionPixelSize(R.dimen.two_panel_home_side_padding);
|
||||
cellLayoutBottomPaddingPx = 0;
|
||||
} else if (isLandscape) {
|
||||
cellLayoutPaddingLeftRightPx = 0;
|
||||
cellLayoutBottomPaddingPx = cellLayoutPadding;
|
||||
} else {
|
||||
@@ -660,6 +665,10 @@ public class DeviceProfile {
|
||||
- (2 * inv.numRows * cellHeightPx) - hotseatVerticalPadding);
|
||||
padding.set(availablePaddingX / 2, edgeMarginPx + availablePaddingY / 2,
|
||||
availablePaddingX / 2, paddingBottom + availablePaddingY / 2);
|
||||
|
||||
if (FeatureFlags.ENABLE_TWO_PANEL_HOME.get()) {
|
||||
padding.set(0, padding.top, 0, padding.bottom);
|
||||
}
|
||||
} else {
|
||||
// Pad the top and bottom of the workspace with search/hotseat bar sizes
|
||||
padding.set(desiredWorkspaceLeftRightMarginPx,
|
||||
|
||||
Reference in new issue
Block a user