use of android.view.animation.AccelerateInterpolator in project TransitionHelper by ImmortalZ.
the class NoneShowMethod method translate.
@Override
public void translate(InfoBean bean, RenderView parent, View child) {
startColor = parent.getResources().getColor(R.color.showmethod_start_color);
endColor = parent.getResources().getColor(R.color.showmethod_end_color);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(duration).start();
}
use of android.view.animation.AccelerateInterpolator in project TransitionHelper by ImmortalZ.
the class ButtonActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TransitionsHeleper.getInstance().setShowMethod(new ColorShowMethod(R.color.bg_purple, R.color.bg_teal) {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
AnimatorSet set = new AnimatorSet();
set.playTogether(ObjectAnimator.ofFloat(copyView, "alpha", 1f, 0f), ObjectAnimator.ofFloat(copyView, "scaleX", 1.5f, 1f), ObjectAnimator.ofFloat(copyView, "scaleY", 1.5f, 1f));
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(duration / 4 * 5).start();
}
@Override
public void loadTargetView(InfoBean bean, ImageView targetView) {
}
}).show(this, null);
}
use of android.view.animation.AccelerateInterpolator in project TransitionHelper by ImmortalZ.
the class FabCircleActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TransitionsHeleper.getInstance().setShowMethod(new ColorShowMethod(R.color.bg_purple, R.color.bg_teal) {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
AnimatorSet set = new AnimatorSet();
set.playTogether(ObjectAnimator.ofFloat(copyView, "rotation", 0, 180), ObjectAnimator.ofFloat(copyView, "scaleX", 1, 0), ObjectAnimator.ofFloat(copyView, "scaleY", 1, 0));
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(duration / 4 * 5).start();
}
@Override
public void loadTargetView(InfoBean bean, ImageView targetView) {
}
}).show(this, null);
}
use of android.view.animation.AccelerateInterpolator in project TransitionHelper by ImmortalZ.
the class FabNoCircleActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TransitionsHeleper.getInstance().setShowMethod(new NoneShowMethod() {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
AnimatorSet set = new AnimatorSet();
set.playTogether(ObjectAnimator.ofFloat(copyView, "rotation", 0, 180), ObjectAnimator.ofFloat(copyView, "scaleX", 1, 0), ObjectAnimator.ofFloat(copyView, "scaleY", 1, 0));
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(duration / 4 * 5).start();
}
}).show(this, null);
}
use of android.view.animation.AccelerateInterpolator in project AndroidDevelop by 7449.
the class BadgeView method init.
private void init(Context context, View target, int tabIndex) {
this.context = context;
this.target = target;
this.targetTabIndex = tabIndex;
badgePosition = DEFAULT_POSITION;
badgeMarginH = dipToPixels(DEFAULT_MARGIN_DIP);
badgeMarginV = badgeMarginH;
badgeColor = DEFAULT_BADGE_COLOR;
setTypeface(Typeface.DEFAULT_BOLD);
int paddingPixels = dipToPixels(DEFAULT_LR_PADDING_DIP);
setPadding(paddingPixels, 0, paddingPixels, 0);
setTextColor(DEFAULT_TEXT_COLOR);
fadeIn = new AlphaAnimation(0, 1);
fadeIn.setInterpolator(new DecelerateInterpolator());
fadeIn.setDuration(200);
fadeOut = new AlphaAnimation(1, 0);
fadeOut.setInterpolator(new AccelerateInterpolator());
fadeOut.setDuration(200);
isShown = false;
if (this.target != null) {
applyTo(this.target);
} else {
show();
}
}
Aggregations