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 HidingLinearLayout method animateWith.
private void animateWith(Animation animation) {
animation.setDuration(150);
animation.setInterpolator(new FastOutSlowInInterpolator());
startAnimation(animation);
}
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 Reader by TheKeeperOfPie.
the class FragmentComments method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
fastOutSlowInInterpolator = new FastOutSlowInInterpolator();
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Reader by TheKeeperOfPie.
the class FragmentThreadList method hideLayoutActions.
private void hideLayoutActions(long offset) {
for (int index = 0; index < layoutActions.getChildCount(); index++) {
final View view = layoutActions.getChildAt(index);
view.setScaleX(1f);
view.setScaleY(1f);
view.setAlpha(1f);
final int finalIndex = index;
ViewCompat.animate(view).alpha(0f).scaleX(0f).scaleY(0f).setInterpolator(fastOutSlowInInterpolator).setDuration(DURATION_ACTIONS_FADE).setStartDelay((long) (index * offset * OFFSET_MODIFIER)).setListener(new ViewPropertyAnimatorListener() {
@Override
public void onAnimationStart(View view) {
}
@Override
public void onAnimationEnd(View view) {
view.setVisibility(View.GONE);
if (finalIndex == layoutActions.getChildCount() - 1) {
buttonExpandActions.setImageResource(R.drawable.ic_unfold_more_white_24dp);
buttonExpandActions.setColorFilter(themer.getColorFilterAccent());
}
}
@Override
public void onAnimationCancel(View view) {
}
}).start();
}
}
Aggregations