Loading src/com/android/launcher3/PagedView.java +7 −2 Original line number Diff line number Diff line Loading @@ -709,6 +709,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou final int scrollOffsetStart = mOrientationHandler.getScrollOffsetStart(this, mInsets); final int scrollOffsetEnd = mOrientationHandler.getScrollOffsetEnd(this, mInsets); boolean pageScrollChanged = false; int panelCount = getPanelCount(); for (int i = startIndex, childStart = scrollOffsetStart; i != endIndex; i += delta) { final View child = getPageAt(i); Loading @@ -726,11 +727,15 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou pageScrollChanged = true; outPageScrolls[i] = pageScroll; } childStart += primaryDimension + mPageSpacing + getChildGap(); childStart += primaryDimension + getChildGap(); // This makes sure that the space is added after the page, not after each panel if (i % panelCount == panelCount - 1) { childStart += mPageSpacing; } } } int panelCount = getPanelCount(); if (panelCount > 1) { for (int i = 0; i < childCount; i++) { // In case we have multiple panels, always use left panel's page scroll for all Loading src/com/android/launcher3/Workspace.java +12 −14 Original line number Diff line number Diff line Loading @@ -315,16 +315,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator> // Increase our bottom insets so we don't overlap with the taskbar. mInsets.bottom += grid.nonOverlappingTaskbarInset; if (grid.isTwoPanels) { setPageSpacing(0); // we have two pages and we don't want any spacing // Add left widget panel if it isn't already there if (!mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage + 1; bindAndInitLeftPanel(); setCurrentPage(newCurrentPage); } } else { if (mWorkspaceFadeInAdjacentScreens) { // In landscape mode the page spacing is set to the default. setPageSpacing(grid.edgeMarginPx); Loading @@ -337,6 +327,14 @@ public class Workspace extends PagedView<WorkspacePageIndicator> setPageSpacing(Math.max(maxInsets, maxPadding)); } if (grid.isTwoPanels) { // Add left widget panel if it isn't already there if (!mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage + 1; bindAndInitLeftPanel(); setCurrentPage(newCurrentPage); } } else { // Remove left widget panel if it is present if (mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage - 1; Loading Loading
src/com/android/launcher3/PagedView.java +7 −2 Original line number Diff line number Diff line Loading @@ -709,6 +709,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou final int scrollOffsetStart = mOrientationHandler.getScrollOffsetStart(this, mInsets); final int scrollOffsetEnd = mOrientationHandler.getScrollOffsetEnd(this, mInsets); boolean pageScrollChanged = false; int panelCount = getPanelCount(); for (int i = startIndex, childStart = scrollOffsetStart; i != endIndex; i += delta) { final View child = getPageAt(i); Loading @@ -726,11 +727,15 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou pageScrollChanged = true; outPageScrolls[i] = pageScroll; } childStart += primaryDimension + mPageSpacing + getChildGap(); childStart += primaryDimension + getChildGap(); // This makes sure that the space is added after the page, not after each panel if (i % panelCount == panelCount - 1) { childStart += mPageSpacing; } } } int panelCount = getPanelCount(); if (panelCount > 1) { for (int i = 0; i < childCount; i++) { // In case we have multiple panels, always use left panel's page scroll for all Loading
src/com/android/launcher3/Workspace.java +12 −14 Original line number Diff line number Diff line Loading @@ -315,16 +315,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator> // Increase our bottom insets so we don't overlap with the taskbar. mInsets.bottom += grid.nonOverlappingTaskbarInset; if (grid.isTwoPanels) { setPageSpacing(0); // we have two pages and we don't want any spacing // Add left widget panel if it isn't already there if (!mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage + 1; bindAndInitLeftPanel(); setCurrentPage(newCurrentPage); } } else { if (mWorkspaceFadeInAdjacentScreens) { // In landscape mode the page spacing is set to the default. setPageSpacing(grid.edgeMarginPx); Loading @@ -337,6 +327,14 @@ public class Workspace extends PagedView<WorkspacePageIndicator> setPageSpacing(Math.max(maxInsets, maxPadding)); } if (grid.isTwoPanels) { // Add left widget panel if it isn't already there if (!mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage + 1; bindAndInitLeftPanel(); setCurrentPage(newCurrentPage); } } else { // Remove left widget panel if it is present if (mWorkspaceScreens.containsKey(LEFT_PANEL_ID)) { int newCurrentPage = mCurrentPage - 1; Loading