Loading quickstep/src/com/android/quickstep/views/ClearAllButton.java +4 −4 Original line number Diff line number Diff line Loading @@ -130,16 +130,16 @@ public class ClearAllButton extends Button implements PageCallbacks { applyPrimaryTranslation(); } public float getScrollAdjustment() { public float getScrollAdjustment(boolean gridEnabled) { float scrollAdjustment = 0; if (mGridProgress > 0) { if (gridEnabled) { scrollAdjustment += mGridTranslationPrimary; } return scrollAdjustment; } public float getOffsetAdjustment() { return getScrollAdjustment(); public float getOffsetAdjustment(boolean gridEnabled) { return getScrollAdjustment(gridEnabled); } /** Loading quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +2 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,8 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> reset(); } setOverlayEnabled(finalState == OVERVIEW || finalState == OVERVIEW_MODAL_TASK); setOverviewGridEnabled(finalState.displayOverviewTasksAsGrid(mActivity)); setOverviewFullscreenEnabled(finalState.getOverviewFullscreenProgress() == 1); setFreezeViewVisibility(false); } Loading quickstep/src/com/android/quickstep/views/RecentsView.java +31 −7 Original line number Diff line number Diff line Loading @@ -299,6 +299,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView protected boolean mDisallowScrollToClearAll; private boolean mOverlayEnabled; protected boolean mFreezeViewVisibility; private boolean mOverviewGridEnabled; private boolean mOverviewFullscreenEnabled; private float mAdjacentPageOffset = 0; private float mTaskViewsSecondaryTranslation = 0; Loading Loading @@ -676,8 +678,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } private boolean isTaskViewWithinBounds(TaskView tv, int start, int end) { int taskStart = mOrientationHandler.getChildStart(tv) + (int) tv.getOffsetAdjustment(); int taskSize = (int) (mOrientationHandler.getMeasuredSize(tv) * tv.getSizeAdjustment()); int taskStart = mOrientationHandler.getChildStart(tv) + (int) tv.getOffsetAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled); int taskSize = (int) (mOrientationHandler.getMeasuredSize(tv) * tv.getSizeAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled)); int taskEnd = taskStart + taskSize; return (taskStart >= start && taskStart <= end) || (taskEnd >= start && taskEnd <= end); Loading Loading @@ -2664,9 +2668,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView View child = getChildAt(i); float scrollDiff = 0; if (child instanceof TaskView) { scrollDiff = ((TaskView) child).getScrollAdjustment(); scrollDiff = ((TaskView) child).getScrollAdjustment(mOverviewFullscreenEnabled, mOverviewGridEnabled); } else if (child instanceof ClearAllButton) { scrollDiff = ((ClearAllButton) child).getScrollAdjustment(); scrollDiff = ((ClearAllButton) child).getScrollAdjustment(mOverviewGridEnabled); } if (scrollDiff != 0) { Loading @@ -2682,9 +2687,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView int childOffset = super.getChildOffset(index); View child = getChildAt(index); if (child instanceof TaskView) { childOffset += ((TaskView) child).getOffsetAdjustment(); childOffset += ((TaskView) child).getOffsetAdjustment(mOverviewFullscreenEnabled, mOverviewGridEnabled); } else if (child instanceof ClearAllButton) { childOffset += ((ClearAllButton) child).getOffsetAdjustment(); childOffset += ((ClearAllButton) child).getOffsetAdjustment(mOverviewGridEnabled); } return childOffset; } Loading @@ -2695,7 +2701,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView if (taskView == null) { return super.getChildVisibleSize(index); } return (int) (super.getChildVisibleSize(index) * taskView.getSizeAdjustment()); return (int) (super.getChildVisibleSize(index) * taskView.getSizeAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled)); } @Override Loading Loading @@ -2810,6 +2817,23 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } } public void setOverviewGridEnabled(boolean overviewGridEnabled) { if (mOverviewGridEnabled != overviewGridEnabled) { mOverviewGridEnabled = overviewGridEnabled; // Request layout to ensure scroll position is recalculated with updated mGridProgress. requestLayout(); } } public void setOverviewFullscreenEnabled(boolean overviewFullscreenEnabled) { if (mOverviewFullscreenEnabled != overviewFullscreenEnabled) { mOverviewFullscreenEnabled = overviewFullscreenEnabled; // Request layout to ensure scroll position is recalculated with updated // mFullscreenProgress. requestLayout(); } } /** * Switch the current running task view to static snapshot mode, * capturing the snapshot at the same time. Loading quickstep/src/com/android/quickstep/views/TaskView.java +9 −9 Original line number Diff line number Diff line Loading @@ -938,31 +938,31 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mNonRtlVisibleOffset = nonRtlVisibleOffset; } public float getScrollAdjustment() { public float getScrollAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float scrollAdjustment = 0; if (mFullscreenProgress > 0) { if (fullscreenEnabled) { scrollAdjustment += mFullscreenTranslationX + mAccumulatedFullscreenTranslationX; } if (mGridProgress > 0) { if (gridEnabled) { scrollAdjustment += mGridTranslationX; } return scrollAdjustment; } public float getOffsetAdjustment() { float offsetAdjustment = getScrollAdjustment(); if (mGridProgress > 0) { public float getOffsetAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float offsetAdjustment = getScrollAdjustment(fullscreenEnabled, gridEnabled); if (gridEnabled) { offsetAdjustment += mGridOffsetTranslationX + mNonRtlVisibleOffset; } return offsetAdjustment; } public float getSizeAdjustment() { public float getSizeAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float sizeAdjustment = 1; if (mFullscreenProgress > 0) { if (fullscreenEnabled) { sizeAdjustment *= mFullscreenScale; } if (mGridProgress > 0) { if (gridEnabled) { sizeAdjustment *= mGridScale; } return sizeAdjustment; Loading Loading
quickstep/src/com/android/quickstep/views/ClearAllButton.java +4 −4 Original line number Diff line number Diff line Loading @@ -130,16 +130,16 @@ public class ClearAllButton extends Button implements PageCallbacks { applyPrimaryTranslation(); } public float getScrollAdjustment() { public float getScrollAdjustment(boolean gridEnabled) { float scrollAdjustment = 0; if (mGridProgress > 0) { if (gridEnabled) { scrollAdjustment += mGridTranslationPrimary; } return scrollAdjustment; } public float getOffsetAdjustment() { return getScrollAdjustment(); public float getOffsetAdjustment(boolean gridEnabled) { return getScrollAdjustment(gridEnabled); } /** Loading
quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +2 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,8 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher> reset(); } setOverlayEnabled(finalState == OVERVIEW || finalState == OVERVIEW_MODAL_TASK); setOverviewGridEnabled(finalState.displayOverviewTasksAsGrid(mActivity)); setOverviewFullscreenEnabled(finalState.getOverviewFullscreenProgress() == 1); setFreezeViewVisibility(false); } Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +31 −7 Original line number Diff line number Diff line Loading @@ -299,6 +299,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView protected boolean mDisallowScrollToClearAll; private boolean mOverlayEnabled; protected boolean mFreezeViewVisibility; private boolean mOverviewGridEnabled; private boolean mOverviewFullscreenEnabled; private float mAdjacentPageOffset = 0; private float mTaskViewsSecondaryTranslation = 0; Loading Loading @@ -676,8 +678,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } private boolean isTaskViewWithinBounds(TaskView tv, int start, int end) { int taskStart = mOrientationHandler.getChildStart(tv) + (int) tv.getOffsetAdjustment(); int taskSize = (int) (mOrientationHandler.getMeasuredSize(tv) * tv.getSizeAdjustment()); int taskStart = mOrientationHandler.getChildStart(tv) + (int) tv.getOffsetAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled); int taskSize = (int) (mOrientationHandler.getMeasuredSize(tv) * tv.getSizeAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled)); int taskEnd = taskStart + taskSize; return (taskStart >= start && taskStart <= end) || (taskEnd >= start && taskEnd <= end); Loading Loading @@ -2664,9 +2668,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView View child = getChildAt(i); float scrollDiff = 0; if (child instanceof TaskView) { scrollDiff = ((TaskView) child).getScrollAdjustment(); scrollDiff = ((TaskView) child).getScrollAdjustment(mOverviewFullscreenEnabled, mOverviewGridEnabled); } else if (child instanceof ClearAllButton) { scrollDiff = ((ClearAllButton) child).getScrollAdjustment(); scrollDiff = ((ClearAllButton) child).getScrollAdjustment(mOverviewGridEnabled); } if (scrollDiff != 0) { Loading @@ -2682,9 +2687,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView int childOffset = super.getChildOffset(index); View child = getChildAt(index); if (child instanceof TaskView) { childOffset += ((TaskView) child).getOffsetAdjustment(); childOffset += ((TaskView) child).getOffsetAdjustment(mOverviewFullscreenEnabled, mOverviewGridEnabled); } else if (child instanceof ClearAllButton) { childOffset += ((ClearAllButton) child).getOffsetAdjustment(); childOffset += ((ClearAllButton) child).getOffsetAdjustment(mOverviewGridEnabled); } return childOffset; } Loading @@ -2695,7 +2701,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView if (taskView == null) { return super.getChildVisibleSize(index); } return (int) (super.getChildVisibleSize(index) * taskView.getSizeAdjustment()); return (int) (super.getChildVisibleSize(index) * taskView.getSizeAdjustment( mOverviewFullscreenEnabled, mOverviewGridEnabled)); } @Override Loading Loading @@ -2810,6 +2817,23 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } } public void setOverviewGridEnabled(boolean overviewGridEnabled) { if (mOverviewGridEnabled != overviewGridEnabled) { mOverviewGridEnabled = overviewGridEnabled; // Request layout to ensure scroll position is recalculated with updated mGridProgress. requestLayout(); } } public void setOverviewFullscreenEnabled(boolean overviewFullscreenEnabled) { if (mOverviewFullscreenEnabled != overviewFullscreenEnabled) { mOverviewFullscreenEnabled = overviewFullscreenEnabled; // Request layout to ensure scroll position is recalculated with updated // mFullscreenProgress. requestLayout(); } } /** * Switch the current running task view to static snapshot mode, * capturing the snapshot at the same time. Loading
quickstep/src/com/android/quickstep/views/TaskView.java +9 −9 Original line number Diff line number Diff line Loading @@ -938,31 +938,31 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { mNonRtlVisibleOffset = nonRtlVisibleOffset; } public float getScrollAdjustment() { public float getScrollAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float scrollAdjustment = 0; if (mFullscreenProgress > 0) { if (fullscreenEnabled) { scrollAdjustment += mFullscreenTranslationX + mAccumulatedFullscreenTranslationX; } if (mGridProgress > 0) { if (gridEnabled) { scrollAdjustment += mGridTranslationX; } return scrollAdjustment; } public float getOffsetAdjustment() { float offsetAdjustment = getScrollAdjustment(); if (mGridProgress > 0) { public float getOffsetAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float offsetAdjustment = getScrollAdjustment(fullscreenEnabled, gridEnabled); if (gridEnabled) { offsetAdjustment += mGridOffsetTranslationX + mNonRtlVisibleOffset; } return offsetAdjustment; } public float getSizeAdjustment() { public float getSizeAdjustment(boolean fullscreenEnabled, boolean gridEnabled) { float sizeAdjustment = 1; if (mFullscreenProgress > 0) { if (fullscreenEnabled) { sizeAdjustment *= mFullscreenScale; } if (mGridProgress > 0) { if (gridEnabled) { sizeAdjustment *= mGridScale; } return sizeAdjustment; Loading