Search in sources :

Example 1 with TranslateEdgeEffect

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

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 2 with TranslateEdgeEffect

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

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 3 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_404Launcher by P-404.

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 4 with TranslateEdgeEffect

use of com.android.launcher3.util.TranslateEdgeEffect in project android_packages_apps_404Launcher by P-404.

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 5 with TranslateEdgeEffect

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

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)

Aggregations

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