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

Commit 116b2c2c authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Minor tweak to initial paging state.

- Making the scroll and focus animations identical so that it doesn't
  cause a weird flicker.

Change-Id: If1e3d23cd5ef45e429341c6bf7ac62b3a17eb662
parent b4ea6ddc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@
    <integer name="recents_animate_task_view_remove_duration">250</integer>

    <!-- The animation duration for scrolling the stack to a particular item. -->
    <integer name="recents_animate_task_stack_scroll_duration">225</integer>
    <integer name="recents_animate_task_stack_scroll_duration">200</integer>

    <!-- The animation duration for entering and exiting the history. -->
    <integer name="recents_history_transition_duration">250</integer>
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class RecentsActivityLaunchState {
            if (launchedFromHome) {
                return numTasks - 1;
            } else {
                if (flags.isFastToggleRecentsEnabled()) {
                if (flags.isFastToggleRecentsEnabled() || !flags.isInitialStatePaging()) {
                    return numTasks - 1;
                } else {
                    return numTasks - 2;
+6 −5
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ public class TaskStackLayoutAlgorithm {

    Context mContext;
    private TaskStackView mStackView;
    private Interpolator mFastOutSlowInInterpolator;
    private Interpolator mLinearOutSlowInInterpolator;
    private StackState mState = StackState.SPLIT;

    // The task bounds (untransformed) for layout.  This rect is anchored at mTaskRoot.
@@ -295,8 +295,8 @@ public class TaskStackLayoutAlgorithm {
        mMaxTranslationZ = res.getDimensionPixelSize(R.dimen.recents_task_view_z_max);
        mContext = context;
        mFreeformLayoutAlgorithm = new FreeformWorkspaceLayoutAlgorithm();
        mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
                com.android.internal.R.interpolator.fast_out_slow_in);
        mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
                com.android.internal.R.interpolator.linear_out_slow_in);
    }

    /**
@@ -486,8 +486,9 @@ public class TaskStackLayoutAlgorithm {
        if (Float.compare(newState, getFocusState()) != 0) {
            mFocusStateAnimator = ObjectAnimator.ofFloat(this, FOCUS_STATE, getFocusState(),
                    newState);
            mFocusStateAnimator.setDuration(200);
            mFocusStateAnimator.setInterpolator(mFastOutSlowInInterpolator);
            mFocusStateAnimator.setDuration(mContext.getResources().getInteger(
                    R.integer.recents_animate_task_stack_scroll_duration));
            mFocusStateAnimator.setInterpolator(mLinearOutSlowInInterpolator);
            mFocusStateAnimator.start();
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class TaskStackViewScroller {
    ObjectAnimator mScrollAnimator;
    float mFinalAnimatedScroll;

    Interpolator mLinearOutSlowInInterpolator;
    private Interpolator mLinearOutSlowInInterpolator;

    public TaskStackViewScroller(Context context, TaskStackLayoutAlgorithm layoutAlgorithm) {
        mContext = context;