بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
سوال: انیمیشن Alfa بین دو رنگ
سلام دوستان
من می خوام برای یک مثلا Button انیمیشنی بذارم که بین دورنگ رفت و آمد کنه یعنی مثلا دائم آبی بشه و قرمز بشه و همینطور.
0
0
این جستجو شاید کمکتون کنه : android color animation using valueanimator (10 سال پیش)
برای این سوال 1 پاسخ وجود دارد.
پاسخ به سوال
Criss
10 سال پیش
0
0
من قبلا یک انیمیشن fadeout و fadein رو ساختم < تفاوتش با چیزی که شما میخواید این هست که بجای رنگ کلمات تغییر میکنه < تجربه ایی که کسب شد بهتره از فایل های Xml برای انیمیشن کمتر استفاده کنیم <
private Animation in;
private Animation out;
.
.
.
in = new AlphaAnimation(0.0f, 1.0f);
in.setDuration(2000);
out = new AlphaAnimation(1.0f, 0.0f);
out.setDuration(2000);
.
.
.
private void animate() {
txtTopLeft.startAnimation(out);
txtTopRight.startAnimation(out);
txtBottomLeft.startAnimation(out);
txtBottomRight.startAnimation(out);
txtCenter.startAnimation(out);
out.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation arg0) {}
@Override
public void onAnimationRepeat(Animation arg0) {}
@Override
public void onAnimationEnd(Animation arg0) {
randomSetChar();
txtTopLeft.startAnimation(in);
txtTopRight.startAnimation(in);
txtBottomLeft.startAnimation(in);
txtBottomRight.startAnimation(in);
txtCenter.startAnimation(in);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
animate();
}
}, 1000);
}
});
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .