Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9a8a422 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

UI fixes to All apps pull up work

b/28917826
- nav bar change to light when top of the all apps container
passes y mid point of the status bar
- apps search edit box change when top of the all apps passes
the bottom of nav bar
- Restrict pull up to work only if the ACTION_DOWN event started
from the hotseat.
- Landscape: reverted old padding and margin. Only the interaction
is different.
- Tuning of the motion spec
- Animation duration respects fling speed more agressively.
- and many more small bugs...

Change-Id: Icde4093c41eeab8c9c6d9dc8b7d57adc3b171349
parent 9417686f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@
            android:id="@+id/apps_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="invisible" />
            android:visibility="invisible"
            launcher:layout_ignoreInsets="true" />
    </com.android.launcher3.dragndrop.DragLayer>

</com.android.launcher3.LauncherRootView>
+3 −1
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ public abstract class BaseContainerView extends FrameLayout {
        super(context, attrs, defStyleAttr);

        int width = ((Launcher) context).getDeviceProfile().availableWidthPx;
        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && (this instanceof AllAppsContainerView)) {
        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP &&
                this instanceof AllAppsContainerView &&
                !((Launcher) context).getDeviceProfile().isLandscape) {
            mHorizontalPadding = 0;
        } else {
            mHorizontalPadding = DeviceProfile.getContainerPadding(context, width);
+4 −3
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ public class InsettableFrameLayout extends FrameLayout implements
    @ViewDebug.ExportedProperty(category = "launcher")
    protected Rect mInsets = new Rect();

    public Rect getInsets() {
        return mInsets;
    }

    public InsettableFrameLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        setOnHierarchyChangeListener(this);
@@ -34,9 +38,6 @@ public class InsettableFrameLayout extends FrameLayout implements
            lp.rightMargin += (newInsets.right - oldInsets.right);
            lp.bottomMargin += (newInsets.bottom - oldInsets.bottom);
        }
        if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && child instanceof AllAppsContainerView) {
            lp.setMargins(0, 0, 0, lp.bottomMargin);
        }
        child.setLayoutParams(lp);
    }

+1 −1
Original line number Diff line number Diff line
@@ -3447,7 +3447,7 @@ public class Launcher extends Activity
     * Updates the set of predicted apps if it hasn't been updated since the last time Launcher was
     * resumed.
     */
    private void tryAndUpdatePredictedApps() {
    public void tryAndUpdatePredictedApps() {
        if (mLauncherCallbacks != null) {
            List<ComponentKey> apps = mLauncherCallbacks.getPredictedApps();
            if (apps != null) {
+4 −15
Original line number Diff line number Diff line
@@ -249,10 +249,9 @@ public class LauncherStateTransitionAnimation {
        cancelAnimation();

        final View contentView = toView.getContentView();

        if (!animated || !initialized) {
        playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                animated, initialized, animation, revealDuration, layerViews);
        if (!animated || !initialized) {

            toView.setTranslationX(0.0f);
            toView.setTranslationY(0.0f);
@@ -276,9 +275,6 @@ public class LauncherStateTransitionAnimation {
            return null;
        }
        if (animType == CIRCULAR_REVEAL) {
            playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                    animated, initialized, animation, revealDuration, layerViews);

            // Setup the reveal view animation
            final View revealView = toView.getRevealView();

@@ -425,8 +421,6 @@ public class LauncherStateTransitionAnimation {
                  }
            });
            mAllAppsController.animateToAllApps(animation, revealDuration);
            playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                    animated, initialized, animation, revealDuration, layerViews);

            dispatchOnLauncherTransitionPrepare(fromView, animated, false);
            dispatchOnLauncherTransitionPrepare(toView, animated, false);
@@ -675,9 +669,9 @@ public class LauncherStateTransitionAnimation {

        boolean multiplePagesVisible = toWorkspaceState.hasMultipleVisiblePages;

        if (!animated || !initialized) {
        playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                animated, initialized, animation, revealDuration, layerViews);
        if (!animated || !initialized) {
            if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
                mAllAppsController.finishPullDown();
            }
@@ -694,12 +688,9 @@ public class LauncherStateTransitionAnimation {
            if (onCompleteRunnable != null) {
                onCompleteRunnable.run();
            }

            return null;
        }
        if (animType == CIRCULAR_REVEAL) {
            playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                    animated, initialized, animation, revealDuration, layerViews);
            final View revealView = fromView.getRevealView();
            final View contentView = fromView.getContentView();

@@ -880,8 +871,6 @@ public class LauncherStateTransitionAnimation {

            });
            mAllAppsController.animateToWorkspace(animation, revealDuration);
            playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
                    animated, initialized, animation, revealDuration, layerViews);

            // Dispatch the prepare transition signal
            dispatchOnLauncherTransitionPrepare(fromView, animated, false);
Loading