use of android.animation.ArgbEvaluator in project coursera-android by aporter.
the class ValueAnimatorActivity method startAnimation.
private void startAnimation() {
final ImageView imageView = findViewById(R.id.image_view);
ValueAnimator anim = ValueAnimator.ofObject(new ArgbEvaluator(), RED, BLUE);
anim.addUpdateListener(new AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
imageView.setBackgroundColor((Integer) animation.getAnimatedValue());
}
});
anim.setDuration(10000);
anim.start();
}
use of android.animation.ArgbEvaluator in project TransitionHelper by ImmortalZ.
the class ColorShowMethod method translate.
@Override
public void translate(InfoBean bean, ExposeView parent, View child) {
if (startColor != 0) {
startColor = parent.getResources().getColor(startColor);
} else {
startColor = parent.getResources().getColor(R.color.transitionhelper_showmethod_start_color);
}
if (endColor != 0) {
endColor = parent.getResources().getColor(endColor);
} else {
endColor = parent.getResources().getColor(R.color.transitionhelper_showmethod_end_color);
}
ObjectAnimator colorAnimator = ObjectAnimator.ofInt(parent, "backgroundColor", startColor, endColor);
colorAnimator.setEvaluator(new ArgbEvaluator());
set.playTogether(ObjectAnimator.ofFloat(child, "translationX", 0, -bean.translationX), ObjectAnimator.ofFloat(child, "translationY", 0, -bean.translationY), ObjectAnimator.ofFloat(child, "scaleX", 1 / bean.scale), ObjectAnimator.ofFloat(child, "scaleY", 1 / bean.scale), colorAnimator);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(showDuration).start();
}
use of android.animation.ArgbEvaluator in project MaterialProgressBar by DreaminginCodeZH.
the class ObjectAnimatorCompatBase method ofArgb.
@NonNull
public static <T> ObjectAnimator ofArgb(@Nullable T target, @NonNull Property<T, Integer> property, int... values) {
ObjectAnimator animator = ObjectAnimator.ofInt(target, property, values);
animator.setEvaluator(new ArgbEvaluator());
return animator;
}
use of android.animation.ArgbEvaluator in project MaterialProgressBar by DreaminginCodeZH.
the class ObjectAnimatorCompatBase method ofArgb.
@NonNull
public static ObjectAnimator ofArgb(@Nullable Object target, @NonNull String propertyName, int... values) {
ObjectAnimator animator = ObjectAnimator.ofInt(target, propertyName, values);
animator.setEvaluator(new ArgbEvaluator());
return animator;
}
use of android.animation.ArgbEvaluator in project AndroidIndicators by MoshDev.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
setTitle(null);
ViewPager mViewPager = (ViewPager) findViewById(R.id.viewPager);
mViewPager.setAdapter(new MyAdapter(getSupportFragmentManager()));
final ViewPagerObserver observer = new ViewPagerObserver(mViewPager);
titleIndicator = (TitleIndicator) findViewById(R.id.titleIndicator);
observer.addObservableView(titleIndicator);
titleIndicator.setToolBar(toolbar);
IconicTabsView iconicTabsView = (IconicTabsView) findViewById(R.id.iconicTabsView);
// iconicTabsView.setIconicTabsEffect(new FadeIconicTabsEffect());
iconicTabsView.setIconicTabsEffect(new GreyscaleIconicTabsEffect());
// iconicTabsView.setIconicTabsEffect(new ArgbIconicTabsEffect(0xFF010101, Color.RED));
observer.addObservableView(iconicTabsView);
ArgbEvaluator argbEvaluator;
}
Aggregations