ここで質問するのは初めてです...誰かが私を助けてくれることを願っています....
と としてアニメーション化する複数の画像をアニメーション化しfade in
たいfade out
。私は1つのイメージビューをアニメーション化することができましたが、最初のイメージビューがフェードアウトすると、2番目のイメージビューがフェードインする必要があります...
アプリケーションが開かれるとループするはずです。ありがとう
これが私のJava onCreate()でアニメーションを呼び出す方法です。
final ImageView image = (ImageView)findViewById(R.id.bsc);
final Animation animationFadeIn = AnimationUtils.loadAnimation(this, R.anim.fadein);
image.startAnimation(animationFadeIn);
final Animation animationFadeOut = AnimationUtils.loadAnimation(this, R.anim.fadeout);
image.startAnimation(animationFadeOut);
フェードイン.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<alpha
android:fromAlpha="0.1"
android:toAlpha="1.0"
android:duration="2000"
/>
</set>
フェードアウト.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.1"
android:duration="2000"
/>
</set>