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

Commit 54974453 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Update quick scrub tip according to the latest mock.

Mock: https://docs.google.com/presentation/d/1TCp1mREgsFAWq4hCnUaSRCpaqvDbzCVkN1mJuRMylIg/edit#slide=id.g3b3fe84fa7_15_0
Screenshot: https://screenshot.googleplex.com/HCVDEVHbdNU

Fixes: 79945911
Test: Manual test
Change-Id: I039e6d6be1b782281f7251a4bee1f3bf2bf03da3
parent 3bc533d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -867,6 +867,8 @@


    <!-- The size of corner radius of the arrow in the onboarding toast. -->
    <!-- The size of corner radius of the arrow in the onboarding toast. -->
    <dimen name="recents_onboarding_toast_arrow_corner_radius">2dp</dimen>
    <dimen name="recents_onboarding_toast_arrow_corner_radius">2dp</dimen>
    <!-- The start margin of quick scrub onboarding toast. -->
    <dimen name="recents_quick_scrub_onboarding_margin_start">8dp</dimen>


    <!-- The min alpha to apply to a task affiliation group color. -->
    <!-- The min alpha to apply to a task affiliation group color. -->
    <item name="recents_task_affiliation_color_min_alpha_percentage" format="float" type="dimen">0.6</item>
    <item name="recents_task_affiliation_color_min_alpha_percentage" format="float" type="dimen">0.6</item>
+18 −5
Original line number Original line Diff line number Diff line
@@ -393,7 +393,20 @@ public class RecentsOnboarding {
        if (!mLayoutAttachedToWindow && orientation == Configuration.ORIENTATION_PORTRAIT) {
        if (!mLayoutAttachedToWindow && orientation == Configuration.ORIENTATION_PORTRAIT) {
            mLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            mLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);


            mWindowManager.addView(mLayout, getWindowLayoutParams());
            final int gravity;
            final int x;
            if (stringRes == R.string.recents_swipe_up_onboarding) {
                gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
                x = 0;
            } else {
                int layoutDirection =
                        mContext.getResources().getConfiguration().getLayoutDirection();
                gravity = Gravity.BOTTOM | (layoutDirection == View.LAYOUT_DIRECTION_LTR
                        ? Gravity.LEFT : Gravity.RIGHT);
                x = mContext.getResources().getDimensionPixelSize(
                        R.dimen.recents_quick_scrub_onboarding_margin_start);
            }
            mWindowManager.addView(mLayout, getWindowLayoutParams(gravity, x));
            mLayout.setAlpha(0);
            mLayout.setAlpha(0);
            mLayout.animate()
            mLayout.animate()
                    .alpha(1f)
                    .alpha(1f)
@@ -459,19 +472,19 @@ public class RecentsOnboarding {
        pw.println("    }");
        pw.println("    }");
    }
    }


    private WindowManager.LayoutParams getWindowLayoutParams() {
    private WindowManager.LayoutParams getWindowLayoutParams(int gravity, int x) {
        int flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
        int flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
                | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
                | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
        final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
        final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                0, -mNavBarHeight / 2,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                x, -mNavBarHeight / 2,
                WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                flags,
                flags,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        lp.setTitle("RecentsOnboarding");
        lp.setTitle("RecentsOnboarding");
        lp.gravity = Gravity.BOTTOM;
        lp.gravity = gravity;
        return lp;
        return lp;
    }
    }