Ich versuche, einen Startbildschirm für meine Android-App zu machen. Ich habe viele Antworten zu dieser Frage gefunden. aber keiner von denen hat richtig funktioniert. Ich möchte nur 1. zuerst fade_in ein ImageView, dann drehen und dann fade_out oder 2. alle zur gleichen Zeit. Ich habe diesen Code versucheandorid animation imageview 1. rotieren und dann für splash ausblenden
final ImageView iv = (ImageView) findViewById(R.id.imageView);
final Animation an = AnimationUtils.loadAnimation(getBaseContext(),R.anim.animate);
iv.startAnimation(an);
an.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {}
@Override
public void onAnimationEnd(Animation animation) {
finish();
Intent i = new Intent(getBaseContext(),Welcome.class);
startActivity(i);
}
@Override
public void onAnimationRepeat(Animation animation) {}
});
und in belebten xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true">
<rotate
android:duration="10000"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
/>
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="5000"/>
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="5000"/>
</set>
wäre es sehr hilfreich, wenn Sie mir eine Lösung finden. Danke
es funktioniert! Danke vielmals... – tanveen