Search in sources :

Example 6 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_Launcher3 by ArrowOS.

the class RecentsView method getUndampedOverScrollShift.

private float getUndampedOverScrollShift() {
    final int width = getWidth();
    final int height = getHeight();
    int primarySize = mOrientationHandler.getPrimaryValue(width, height);
    int secondarySize = mOrientationHandler.getSecondaryValue(width, height);
    float effectiveShift = 0;
    if (!mEdgeGlowLeft.isFinished()) {
        mEdgeGlowLeft.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowLeft).getTranslationShift(mTempFloat)) {
            effectiveShift = mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    if (!mEdgeGlowRight.isFinished()) {
        mEdgeGlowRight.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowRight).getTranslationShift(mTempFloat)) {
            effectiveShift -= mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    return effectiveShift * primarySize;
}
Also used : TranslateEdgeEffect(com.android.launcher3.util.TranslateEdgeEffect) TextPaint(android.text.TextPaint) Point(android.graphics.Point)

Example 7 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_Launcher3 by ArrowOS.

the class RecentsView method initEdgeEffect.

@Override
protected void initEdgeEffect() {
    mEdgeGlowLeft = new TranslateEdgeEffect(getContext());
    mEdgeGlowRight = new TranslateEdgeEffect(getContext());
}
Also used : TranslateEdgeEffect(com.android.launcher3.util.TranslateEdgeEffect)

Example 8 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_Launcher3 by ProtonAOSP.

the class RecentsView method getUndampedOverScrollShift.

private float getUndampedOverScrollShift() {
    final int width = getWidth();
    final int height = getHeight();
    int primarySize = mOrientationHandler.getPrimaryValue(width, height);
    int secondarySize = mOrientationHandler.getSecondaryValue(width, height);
    float effectiveShift = 0;
    if (!mEdgeGlowLeft.isFinished()) {
        mEdgeGlowLeft.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowLeft).getTranslationShift(mTempFloat)) {
            effectiveShift = mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    if (!mEdgeGlowRight.isFinished()) {
        mEdgeGlowRight.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowRight).getTranslationShift(mTempFloat)) {
            effectiveShift -= mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    return effectiveShift * primarySize;
}
Also used : TranslateEdgeEffect(com.android.launcher3.util.TranslateEdgeEffect) TextPaint(android.text.TextPaint) Point(android.graphics.Point)

Example 9 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_Launcher3 by AOSPA.

the class RecentsView method initEdgeEffect.

@Override
protected void initEdgeEffect() {
    mEdgeGlowLeft = new TranslateEdgeEffect(getContext());
    mEdgeGlowRight = new TranslateEdgeEffect(getContext());
}
Also used : TranslateEdgeEffect(com.android.launcher3.util.TranslateEdgeEffect)

Example 10 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_Launcher3 by AOSPA.

the class RecentsView method getUndampedOverScrollShift.

private float getUndampedOverScrollShift() {
    final int width = getWidth();
    final int height = getHeight();
    int primarySize = mOrientationHandler.getPrimaryValue(width, height);
    int secondarySize = mOrientationHandler.getSecondaryValue(width, height);
    float effectiveShift = 0;
    if (!mEdgeGlowLeft.isFinished()) {
        mEdgeGlowLeft.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowLeft).getTranslationShift(mTempFloat)) {
            effectiveShift = mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    if (!mEdgeGlowRight.isFinished()) {
        mEdgeGlowRight.setSize(secondarySize, primarySize);
        if (((TranslateEdgeEffect) mEdgeGlowRight).getTranslationShift(mTempFloat)) {
            effectiveShift -= mTempFloat[0];
            postInvalidateOnAnimation();
        }
    }
    return effectiveShift * primarySize;
}
Also used : TranslateEdgeEffect(com.android.launcher3.util.TranslateEdgeEffect) TextPaint(android.text.TextPaint) Point(android.graphics.Point)

Aggregations

TranslateEdgeEffect (com.android.launcher3.util.TranslateEdgeEffect)10 Point (android.graphics.Point)5 TextPaint (android.text.TextPaint)5