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;
}
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());
}
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;
}
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());
}
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;
}
Aggregations