use of immortalz.me.library.method.ColorShowMethod 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 immortalz.me.library.method.ColorShowMethod 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 immortalz.me.library.method.ColorShowMethod in project TransitionHelper by ImmortalZ.
the class FDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportFragmentManager().beginTransaction().replace(R.id.container, DetailFragment.newInstance()).commit();
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);
}
Aggregations