use of android.view.animation.AccelerateInterpolator in project DropListView by ufo22940268.
the class DropListView method getDropViewScrollAnimator.
private ValueAnimator getDropViewScrollAnimator(int to) {
ValueAnimator restoreAnimator = ValueAnimator.ofFloat(mHeaderView.getBottom(), to);
restoreAnimator.setDuration(getResources().getInteger(android.R.integer.config_shortAnimTime));
restoreAnimator.setInterpolator(new AccelerateInterpolator());
restoreAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float v = ((Float) (animation.getAnimatedValue())).floatValue();
updateDropviewScroll((int) v);
}
});
return restoreAnimator;
}
use of android.view.animation.AccelerateInterpolator in project wire-android by wireapp.
the class BackgroundDrawable method setupOverlayAnimation.
private void setupOverlayAnimation() {
overlayAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float fraction = animation.getAnimatedFraction();
float darknessRange = MAX_DARKNESS_OPACITY - MIN_DARKNESS_OPACITY;
float radiusRage = MAX_RADIUS_FACTOR - MIN_RADIUS_FACTOR;
float colorOpacityRange = RESTING_COLOR_OPACITY - MIN_COLOR_OPACITY;
if (isOverlayVisible) {
//animating on
darknessOpacity = MIN_DARKNESS_OPACITY + darknessRange * fraction;
vignetteRadiusFactor = MAX_RADIUS_FACTOR - radiusRage * fraction;
accentColorOpacity = MIN_COLOR_OPACITY + colorOpacityRange * fraction;
} else {
//animating off
darknessOpacity = MAX_DARKNESS_OPACITY - darknessRange * fraction;
vignetteRadiusFactor = MIN_RADIUS_FACTOR + radiusRage * fraction;
accentColorOpacity = RESTING_COLOR_OPACITY - colorOpacityRange * fraction;
}
updateFilter();
}
});
overlayAnimation.setInterpolator(new AccelerateInterpolator());
overlayAnimation.setDuration(OVERLAY_ANIMATION_DURATION);
}
use of android.view.animation.AccelerateInterpolator in project teaTime by ancfdy.
the class ViewAnimator method animateHideView.
private void animateHideView(final int position) {
final View view = viewList.get(position);
FlipAnimation rotation = new FlipAnimation(0, 90, 0.0f, view.getHeight() / 2.0f);
rotation.setDuration(ANIMATION_DURATION);
rotation.setFillAfter(true);
rotation.setInterpolator(new AccelerateInterpolator());
rotation.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
view.clearAnimation();
view.setVisibility(View.INVISIBLE);
if (position == viewList.size() - 1) {
animatorListener.enableHomeButton();
drawerLayout.closeDrawers();
}
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
view.startAnimation(rotation);
}
use of android.view.animation.AccelerateInterpolator in project Lightning-Browser by anthonycr.
the class VerticalItemAnimator method animateRemoveImpl.
private void animateRemoveImpl(final ViewHolder holder) {
final View view = holder.itemView;
final ViewPropertyAnimatorCompat animation = ViewCompat.animate(view);
mRemoveAnimations.add(holder);
animation.setDuration(getRemoveDuration()).alpha(0).translationX(-holder.itemView.getWidth() / 2).setInterpolator(new AccelerateInterpolator()).setListener(new VpaListenerAdapter() {
@Override
public void onAnimationStart(View view) {
dispatchRemoveStarting(holder);
}
@Override
public void onAnimationEnd(View view) {
animation.setListener(null);
ViewCompat.setAlpha(view, 1);
ViewCompat.setTranslationX(view, 0);
dispatchRemoveFinished(holder);
mRemoveAnimations.remove(holder);
dispatchFinishedWhenDone();
}
}).start();
}
use of android.view.animation.AccelerateInterpolator in project PreviewSeekBar by rubensousa.
the class PreviewAnimatorLollipopImpl method startUnreveal.
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void startUnreveal() {
Animator animator = ViewAnimationUtils.createCircularReveal(previewView, getCenterX(previewView), getCenterY(previewView), getRadius(previewView), morphView.getWidth() * 2);
animator.setTarget(previewView);
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
previewView.animate().setListener(null);
frameView.setVisibility(View.INVISIBLE);
previewView.setVisibility(View.INVISIBLE);
morphView.setVisibility(View.VISIBLE);
morphView.animate().y(getHideY()).scaleY(0.5f).scaleX(0.5f).setDuration(UNMORPH_MOVE_DURATION).setInterpolator(new AccelerateInterpolator()).setListener(hideListener);
}
});
frameView.animate().alpha(1f).setDuration(UNMORPH_UNREVEAL_DURATION).setInterpolator(new AccelerateInterpolator());
animator.setDuration(UNMORPH_UNREVEAL_DURATION).setInterpolator(new AccelerateInterpolator());
animator.start();
}
Aggregations