私はandroid.R.anim.fade_in(fade_out)で利用可能なfade_inとfade_outアニメーションを使用しています。基本的にはアニメーションの長さを変更できますが、アニメーションが 0.5 秒または 2 秒であってもスムーズではありません。フェードイン/フェードアウトのアニメーションをスムーズにする方法はありますか? どうもありがとう!
コード:
imageSwitcher = (ImageSwitcher) findViewById(R.id.imageswitcher);
slide_in_left = AnimationUtils.loadAnimation(this, R.anim.fade);
slide_out_right = AnimationUtils.loadAnimation(this, R.anim.fade_out);
imageSwitcher.setInAnimation(slide_in_left);
imageSwitcher.setOutAnimation(slide_out_right);
*XML フェードアウト:*
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:duration="1500"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator" />
</set>