use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Reader by TheKeeperOfPie.
the class FragmentThreadList method showLayoutActions.
private void showLayoutActions() {
for (int index = layoutActions.getChildCount() - 1; index >= 0; index--) {
final View view = layoutActions.getChildAt(index);
view.setScaleX(0f);
view.setScaleY(0f);
view.setAlpha(0f);
view.setVisibility(View.VISIBLE);
final int finalIndex = index;
ViewCompat.animate(view).alpha(1f).scaleX(1f).scaleY(1f).setInterpolator(fastOutSlowInInterpolator).setDuration(DURATION_ACTIONS_FADE).setStartDelay((long) ((layoutActions.getChildCount() - 1 - index) * DURATION_ACTIONS_FADE * OFFSET_MODIFIER)).setListener(new ViewPropertyAnimatorListener() {
@Override
public void onAnimationStart(View view) {
if (finalIndex == 0) {
buttonExpandActions.setImageResource(android.R.color.transparent);
}
}
@Override
public void onAnimationEnd(View view) {
}
@Override
public void onAnimationCancel(View view) {
}
}).start();
}
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project Reader by TheKeeperOfPie.
the class FragmentComments 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();
}
}
use of android.support.v4.view.animation.FastOutSlowInInterpolator in project CircularReveal by ozodrukh.
the class MainActivity method executeCirclesDropDown.
private void executeCirclesDropDown() {
final int length = circlesLine.getChildCount();
Animator[] animators = new Animator[length];
for (int i = 0; i < length; i++) {
View target = circlesLine.getChildAt(i);
final float x0 = -10 * i;
final float y0 = -10 * i;
target.setTranslationX(x0);
target.setTranslationY(y0);
AnimatorPath path = new AnimatorPath();
path.moveTo(x0, y0);
path.curveTo(x0, y0, 0, y0, 0, 0);
PathPoint[] points = new PathPoint[path.getPoints().size()];
path.getPoints().toArray(points);
AnimatorSet set = new AnimatorSet();
set.play(ObjectAnimator.ofObject(target, PATH_POINT, new PathEvaluator(), points)).with(ObjectAnimator.ofFloat(target, View.ALPHA, (length - i) * 0.1f + 0.6f, 1f));
animators[i] = set;
animators[i].setStartDelay(15 * i);
}
AnimatorSet set = new AnimatorSet();
set.playTogether(animators);
set.setInterpolator(new FastOutSlowInInterpolator());
set.setDuration(FAST_DURATION);
set.start();
}
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 Douya by DreaminginCodeZH.
the class AppBarWrapperLayout method show.
public void show() {
if (mShowing) {
return;
}
mShowing = true;
cancelAnimator();
mAnimator = new AnimatorSet().setDuration(mAnimationDuration);
mAnimator.setInterpolator(new FastOutSlowInInterpolator());
AnimatorSet.Builder builder = mAnimator.play(ObjectAnimator.ofFloat(this, TRANSLATION_Y, getTranslationY(), 0));
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
builder.with(ObjectAnimator.ofFloat(mShadowCompatView, ALPHA, mShadowCompatView.getAlpha(), 1));
} else {
builder.with(ObjectAnimator.ofFloat(mAppbarView, TRANSLATION_Z, mAppbarView.getTranslationZ(), 0));
}
mAnimator.start();
}
Aggregations