Loading app/src/main/java/foundation/e/blisslauncher/core/customviews/LauncherPagedView.java +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ public class LauncherPagedView extends PagedView<PageIndicatorDots> implements V } public void bindAndInitFirstScreen(View view) { // Do nothing here. } public void removeAllWorkspaceScreens() { Loading app/src/main/java/foundation/e/blisslauncher/features/test/CellLayout.kt +4 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,10 @@ open class CellLayout @JvmOverloads constructor( }) mDragOutlineAnims[i] = anim } setOnClickListener { launcher.getLauncherPagedView().setWobbleExpirationAlarm(0) // Stop wobbling immediately if empty space is touched. } } override fun onMeasure(widthSpec: Int, heightSpec: Int) { Loading app/src/main/java/foundation/e/blisslauncher/features/widgets/WidgetsRootView.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,10 @@ public class WidgetsRootView extends HorizontalScrollView { private boolean shouldScrollWorkspace = true; // The following constants need to be scaled based on density. The scaled versions will be // assigned to the corresponding member variables below. private static final int FLING_THRESHOLD_VELOCITY = 500; public WidgetsRootView(Context context) { super(context); init(); Loading Loading @@ -55,6 +59,16 @@ public class WidgetsRootView extends HorizontalScrollView { } } @Override public void fling(int velocityX) { super.fling(velocityX); float density = getResources().getDisplayMetrics().density; if (Math.abs(velocityX) > FLING_THRESHOLD_VELOCITY * density) { shouldScrollWorkspace = !shouldScrollWorkspace; overlay.onScrollInteractionEnd(); } } @Override protected boolean overScrollBy( int deltaX, Loading app/src/quickstep/recents_ui_overrides/src/foundation/e/blisslauncher/uioverrides/OverlayCallbackImpl.java +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ public class OverlayCallbackImpl implements TestActivity.LauncherOverlay { private TestActivity.LauncherOverlayCallbacks mLauncherOverlayCallbacks; // The page is moved more than halfway, automatically move to the next page on touch up. private static final float SIGNIFICANT_MOVE_THRESHOLD = 0.4f; public OverlayCallbackImpl(TestActivity launcher) { this.mLauncher = launcher; } Loading @@ -27,10 +30,10 @@ public class OverlayCallbackImpl implements TestActivity.LauncherOverlay { @Override public void onScrollInteractionEnd() { if(scrollFromWorkspace) { if(mProgress >= 0.5f) mLauncherOverlayCallbacks.onScrollEnd(1f, true); if(mProgress >= SIGNIFICANT_MOVE_THRESHOLD) mLauncherOverlayCallbacks.onScrollEnd(1f, true); else mLauncherOverlayCallbacks.onScrollEnd(0f, true); } else { if(mProgress < 0.5f) mLauncherOverlayCallbacks.onScrollEnd(0f, false); if(mProgress < SIGNIFICANT_MOVE_THRESHOLD) mLauncherOverlayCallbacks.onScrollEnd(0f, false); else mLauncherOverlayCallbacks.onScrollEnd(1f, false); } } Loading Loading
app/src/main/java/foundation/e/blisslauncher/core/customviews/LauncherPagedView.java +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ public class LauncherPagedView extends PagedView<PageIndicatorDots> implements V } public void bindAndInitFirstScreen(View view) { // Do nothing here. } public void removeAllWorkspaceScreens() { Loading
app/src/main/java/foundation/e/blisslauncher/features/test/CellLayout.kt +4 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,10 @@ open class CellLayout @JvmOverloads constructor( }) mDragOutlineAnims[i] = anim } setOnClickListener { launcher.getLauncherPagedView().setWobbleExpirationAlarm(0) // Stop wobbling immediately if empty space is touched. } } override fun onMeasure(widthSpec: Int, heightSpec: Int) { Loading
app/src/main/java/foundation/e/blisslauncher/features/widgets/WidgetsRootView.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,10 @@ public class WidgetsRootView extends HorizontalScrollView { private boolean shouldScrollWorkspace = true; // The following constants need to be scaled based on density. The scaled versions will be // assigned to the corresponding member variables below. private static final int FLING_THRESHOLD_VELOCITY = 500; public WidgetsRootView(Context context) { super(context); init(); Loading Loading @@ -55,6 +59,16 @@ public class WidgetsRootView extends HorizontalScrollView { } } @Override public void fling(int velocityX) { super.fling(velocityX); float density = getResources().getDisplayMetrics().density; if (Math.abs(velocityX) > FLING_THRESHOLD_VELOCITY * density) { shouldScrollWorkspace = !shouldScrollWorkspace; overlay.onScrollInteractionEnd(); } } @Override protected boolean overScrollBy( int deltaX, Loading
app/src/quickstep/recents_ui_overrides/src/foundation/e/blisslauncher/uioverrides/OverlayCallbackImpl.java +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ public class OverlayCallbackImpl implements TestActivity.LauncherOverlay { private TestActivity.LauncherOverlayCallbacks mLauncherOverlayCallbacks; // The page is moved more than halfway, automatically move to the next page on touch up. private static final float SIGNIFICANT_MOVE_THRESHOLD = 0.4f; public OverlayCallbackImpl(TestActivity launcher) { this.mLauncher = launcher; } Loading @@ -27,10 +30,10 @@ public class OverlayCallbackImpl implements TestActivity.LauncherOverlay { @Override public void onScrollInteractionEnd() { if(scrollFromWorkspace) { if(mProgress >= 0.5f) mLauncherOverlayCallbacks.onScrollEnd(1f, true); if(mProgress >= SIGNIFICANT_MOVE_THRESHOLD) mLauncherOverlayCallbacks.onScrollEnd(1f, true); else mLauncherOverlayCallbacks.onScrollEnd(0f, true); } else { if(mProgress < 0.5f) mLauncherOverlayCallbacks.onScrollEnd(0f, false); if(mProgress < SIGNIFICANT_MOVE_THRESHOLD) mLauncherOverlayCallbacks.onScrollEnd(0f, false); else mLauncherOverlayCallbacks.onScrollEnd(1f, false); } } Loading