use of android.view.animation.BounceInterpolator in project android_frameworks_base by ResurrectionRemix.
the class QSPanel method setAnimationTile.
private void setAnimationTile(TileRecord r) {
ObjectAnimator animTile = null;
int animStyle = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_STYLE, 0, UserHandle.USER_CURRENT);
int animDuration = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_DURATION, 2000, UserHandle.USER_CURRENT);
int interpolatorType = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_INTERPOLATOR, 0, UserHandle.USER_CURRENT);
if (animStyle == 0) {
//No animation
}
if (animStyle == 1) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotationY", 0f, 360f);
}
if (animStyle == 2) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotation", 0f, 360f);
}
if (animTile != null) {
switch(interpolatorType) {
case 0:
animTile.setInterpolator(new LinearInterpolator());
break;
case 1:
animTile.setInterpolator(new AccelerateInterpolator());
break;
case 2:
animTile.setInterpolator(new DecelerateInterpolator());
break;
case 3:
animTile.setInterpolator(new AccelerateDecelerateInterpolator());
break;
case 4:
animTile.setInterpolator(new BounceInterpolator());
break;
case 5:
animTile.setInterpolator(new OvershootInterpolator());
break;
case 6:
animTile.setInterpolator(new AnticipateInterpolator());
break;
case 7:
animTile.setInterpolator(new AnticipateOvershootInterpolator());
break;
default:
break;
}
animTile.setDuration(animDuration);
animTile.start();
}
}
use of android.view.animation.BounceInterpolator in project android_frameworks_base by DirtyUnicorns.
the class QSPanel method setAnimationTile.
private void setAnimationTile(TileRecord r) {
ObjectAnimator animTile = null;
int animStyle = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_STYLE, 0, UserHandle.USER_CURRENT);
int animDuration = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_DURATION, 2000, UserHandle.USER_CURRENT);
int interpolatorType = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_INTERPOLATOR, 0, UserHandle.USER_CURRENT);
if (animStyle == 0) {
//No animation
}
if (animStyle == 1) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotationY", 0f, 360f);
}
if (animStyle == 2) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotation", 0f, 360f);
}
if (animTile != null) {
switch(interpolatorType) {
case 0:
animTile.setInterpolator(new LinearInterpolator());
break;
case 1:
animTile.setInterpolator(new AccelerateInterpolator());
break;
case 2:
animTile.setInterpolator(new DecelerateInterpolator());
break;
case 3:
animTile.setInterpolator(new AccelerateDecelerateInterpolator());
break;
case 4:
animTile.setInterpolator(new BounceInterpolator());
break;
case 5:
animTile.setInterpolator(new OvershootInterpolator());
break;
case 6:
animTile.setInterpolator(new AnticipateInterpolator());
break;
case 7:
animTile.setInterpolator(new AnticipateOvershootInterpolator());
break;
default:
break;
}
animTile.setDuration(animDuration);
animTile.start();
}
}
use of android.view.animation.BounceInterpolator in project android_frameworks_base by crdroidandroid.
the class QSPanel method setAnimationTile.
private void setAnimationTile(TileRecord r) {
ObjectAnimator animTile = null;
int animStyle = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_STYLE, 0, UserHandle.USER_CURRENT);
int animDuration = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_DURATION, 2000, UserHandle.USER_CURRENT);
int interpolatorType = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.ANIM_TILE_INTERPOLATOR, 0, UserHandle.USER_CURRENT);
if (animStyle == 0) {
//No animation
}
if (animStyle == 1) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotationY", 0f, 360f);
}
if (animStyle == 2) {
animTile = ObjectAnimator.ofFloat(r.tileView, "rotation", 0f, 360f);
}
if (animTile != null) {
switch(interpolatorType) {
case 0:
animTile.setInterpolator(new LinearInterpolator());
break;
case 1:
animTile.setInterpolator(new AccelerateInterpolator());
break;
case 2:
animTile.setInterpolator(new DecelerateInterpolator());
break;
case 3:
animTile.setInterpolator(new AccelerateDecelerateInterpolator());
break;
case 4:
animTile.setInterpolator(new BounceInterpolator());
break;
case 5:
animTile.setInterpolator(new OvershootInterpolator());
break;
case 6:
animTile.setInterpolator(new AnticipateInterpolator());
break;
case 7:
animTile.setInterpolator(new AnticipateOvershootInterpolator());
break;
default:
break;
}
animTile.setDuration(animDuration);
animTile.start();
}
}
use of android.view.animation.BounceInterpolator in project smartmodule by carozhu.
the class AnimationController method setEffect.
private void setEffect(Animation animation, int interpolatorType, long durationMillis, long delayMillis) {
switch(interpolatorType) {
case 0:
animation.setInterpolator(new LinearInterpolator());
break;
case 1:
animation.setInterpolator(new AccelerateInterpolator());
break;
case 2:
animation.setInterpolator(new DecelerateInterpolator());
break;
case 3:
animation.setInterpolator(new AccelerateDecelerateInterpolator());
break;
case 4:
animation.setInterpolator(new BounceInterpolator());
break;
case 5:
animation.setInterpolator(new OvershootInterpolator());
break;
case 6:
animation.setInterpolator(new AnticipateInterpolator());
break;
case 7:
animation.setInterpolator(new AnticipateOvershootInterpolator());
break;
default:
break;
}
animation.setDuration(durationMillis);
animation.setStartOffset(delayMillis);
}
use of android.view.animation.BounceInterpolator in project WilliamChart by diogobernardino.
the class LineCardOne method dismiss.
@Override
public void dismiss(Runnable action) {
super.dismiss(action);
mChart.dismissAllTooltips();
mChart.dismiss(new Animation().setInterpolator(new BounceInterpolator()).withEndAction(action));
}
Aggregations