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

Commit 934d0835 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fixing up overscroll / hints on tablet

Change-Id: I8b0ce30b02b2d13d71826d6765d154f5ab89072b
parent 5d47a8dc
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -86,6 +86,17 @@ public class KeyguardWidgetCarousel extends KeyguardWidgetPager {
        }
    }

    public void showInitialPageHints() {
        int count = getChildCount();
        for (int i = 0; i < count; i++) {
            KeyguardWidgetFrame child = getWidgetPageAt(i);
            if (i >= mCurrentPage - 1 && i <= mCurrentPage + 1) {
                child.fadeFrame(this, true, KeyguardWidgetFrame.OUTLINE_ALPHA_MULTIPLIER,
                        CHILDREN_OUTLINE_FADE_IN_DURATION);
            }
        }
    }

    @Override
    protected void screenScrolled(int screenCenter) {
        mScreenCenter = screenCenter;
+3 −1
Original line number Diff line number Diff line
@@ -450,7 +450,9 @@ public class KeyguardWidgetFrame extends FrameLayout {

            // We bump up the alpha of the outline to hide the fact that the overlay is drawing
            // over the rounded part of the frame.
            setBackgroundAlpha(OUTLINE_ALPHA_MULTIPLIER + r * (1 - OUTLINE_ALPHA_MULTIPLIER));
            float bgAlpha = Math.min(OUTLINE_ALPHA_MULTIPLIER + r * (1 - OUTLINE_ALPHA_MULTIPLIER),
                    1f);
            setBackgroundAlpha(bgAlpha);
            invalidate();
        }
    }