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

Commit 14991504 authored by Winson's avatar Winson
Browse files

Tweaking stack shadows and layout.

- Properly setting view outline alpha
- Ensuring that dismissing while in focused state will return to
  non-focused state
- Fixing mis-calculation with bottom stack area

Change-Id: I281b7707421ffde4225180c63c7d40bf325f7f72
parent 68088812
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@

    <!-- The radius of the rounded corners on a task view. -->
    <dimen name="recents_task_view_rounded_corners_radius">3dp</dimen>
    <!-- The radius of the rounded corners on a task view's shadow. -->
    <dimen name="recents_task_view_shadow_rounded_corners_radius">18dp</dimen>

    <!-- The fraction of the screen height where the clock on the Keyguard has its center. The
     max value is used when no notifications are displaying, and the min value is when the
+7 −5
Original line number Diff line number Diff line
@@ -227,12 +227,14 @@

    <!-- The radius of the rounded corners on a task view. -->
    <dimen name="recents_task_view_rounded_corners_radius">2dp</dimen>
    <!-- The radius of the rounded corners on a task view's shadow. -->
    <dimen name="recents_task_view_shadow_rounded_corners_radius">12dp</dimen>

    <!-- The min translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_min">16dp</dimen>
    <dimen name="recents_task_view_z_min">3dp</dimen>

    <!-- The max translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_max">48dp</dimen>
    <dimen name="recents_task_view_z_max">24dp</dimen>

    <!-- The amount to translate when animating the removal of a task. -->
    <dimen name="recents_task_view_remove_anim_translation_x">100dp</dimen>
@@ -273,11 +275,11 @@
    <!-- The amount to allow the stack to overscroll. -->
    <dimen name="recents_stack_overscroll">24dp</dimen>

    <!-- The size of the peek area at the top of the stack. -->
    <!-- The size of the peek area at the top of the stack (below the status bar). -->
    <dimen name="recents_layout_focused_top_peek_size">@dimen/recents_history_button_height</dimen>

    <!-- The size of the peek area at the bottom of the stack. -->
    <dimen name="recents_layout_focused_bottom_peek_size">@dimen/recents_history_button_height</dimen>
    <!-- The size of each task peek area at the bottom of the stack (above the nav bar). -->
    <dimen name="recents_layout_focused_bottom_task_peek_size">16dp</dimen>

    <!-- The height of the history button. -->
    <dimen name="recents_history_button_height">48dp</dimen>
+7 −0
Original line number Diff line number Diff line
@@ -81,6 +81,13 @@ public class AnimateableViewBounds extends ViewOutlineProvider {
        }
    }

    /**
     * @return the outline alpha.
     */
    public float getAlpha() {
        return mAlpha;
    }

    /** Sets the top clip. */
    public void setClipTop(int top) {
        mClipRect.top = top;
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ public class FreeformWorkspaceLayoutAlgorithm {
            transformOut.alpha = 1f;
            transformOut.translationZ = stackLayout.mMaxTranslationZ;
            transformOut.dimAlpha = 0f;
            transformOut.viewOutlineAlpha = TaskStackLayoutAlgorithm.OUTLINE_ALPHA_MAX_VALUE;
            transformOut.rect.set(ffRect);
            transformOut.rect.offset(stackLayout.mFreeformRect.left, stackLayout.mFreeformRect.top);
            transformOut.visible = true;
+2 −1
Original line number Diff line number Diff line
@@ -458,7 +458,8 @@ public class TaskStackAnimationHelper {
        mStackView.cancelDeferredTaskViewLayoutAnimation();

        // Get the final set of task transforms
        mStackView.getLayoutTaskTransforms(newScroll, stackTasks, mTmpFinalTaskTransforms);
        mStackView.getLayoutTaskTransforms(newScroll, stackLayout.getFocusState(), stackTasks,
                mTmpFinalTaskTransforms);

        // Focus the task view
        TaskView newFocusedTaskView = mStackView.getChildViewForTask(newFocusedTask);
Loading