use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Signal-Android by WhisperSystems.
the class QuickAttachmentDrawer method slideTo.
private void slideTo(int slideOffset, boolean forceInstant) {
if (animator != null) {
animator.cancel();
animator = null;
}
if (!forceInstant) {
animator = ObjectAnimator.ofInt(this, "slideOffset", this.slideOffset, slideOffset);
animator.setInterpolator(new FastOutSlowInInterpolator());
animator.setDuration(400);
animator.start();
ViewCompat.postInvalidateOnAnimation(this);
} else {
this.slideOffset = slideOffset;
requestLayout();
invalidate();
}
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Signal-Android by WhisperSystems.
the class TransferControlView method getWidthAnimator.
private Animator getWidthAnimator(final int from, final int to) {
final ValueAnimator anim = ValueAnimator.ofInt(from, to);
anim.addUpdateListener(new AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
final int val = (Integer) animation.getAnimatedValue();
final ViewGroup.LayoutParams layoutParams = getLayoutParams();
layoutParams.width = val;
setLayoutParams(layoutParams);
}
});
anim.setInterpolator(new FastOutSlowInInterpolator());
anim.setDuration(TRANSITION_MS);
return anim;
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ColorPickerFragment method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.reset_color:
case R.id.reset_color1:
mColorPicker.setColor(mResetColor1, true);
return true;
case R.id.reset_color2:
mColorPicker.setColor(mResetColor2, true);
return true;
case R.id.edit_hex:
mEditHexValue.setText(ColorPickerPreference.convertToARGB(mNewColorValue));
return true;
case R.id.show_hide_favorites:
mAnimationType = FAVORITES_VISIBILITY;
mAnimator.setInterpolator(new FastOutSlowInInterpolator());
mAnimator.setDuration(300);
mAnimator.start();
return true;
case R.id.show_hide_help:
mAnimationType = HELP_SCREEN_VISIBILITY;
mAnimator.setInterpolator(new FastOutSlowInInterpolator());
mAnimator.setDuration(mShowFavorites ? 195 : 225);
mAnimator.start();
default:
return super.onOptionsItemSelected(item);
}
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Slide by ccrama.
the class MainActivity method slideAnimator.
private ValueAnimator slideAnimator(int start, int end, final View v) {
ValueAnimator animator = ValueAnimator.ofInt(start, end);
animator.setInterpolator(new FastOutSlowInInterpolator());
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
// Update Height
int value = (Integer) valueAnimator.getAnimatedValue();
ViewGroup.LayoutParams layoutParams = v.getLayoutParams();
layoutParams.height = value;
v.setLayoutParams(layoutParams);
}
});
return animator;
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Slide by ccrama.
the class MediaView method fadeAnimator.
private static ValueAnimator fadeAnimator(float start, float end, final View v) {
ValueAnimator animator = ValueAnimator.ofFloat(start, end);
animator.setInterpolator(new FastOutSlowInInterpolator());
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
// Update Height
float value = (Float) valueAnimator.getAnimatedValue();
v.setAlpha(value);
}
});
return animator;
}
Aggregations