Я не хочу, чтобы мои два животных запускались одновременно и одно за другим.
У вас есть идеи?
Моя анимация:
fade1
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="1500"
/>
fade2
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="3000"
/>
Моя идея не работает
private void animations_sequencing(){
//The first anim start
try{
text.setText("Hello");
text.startAnimation(AnimationUtils.loadAnimation(Main2Activity.this, R.anim.fade1));
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
//The first anim is end, the seconde anim start
try{
text.setText("World");
text.startAnimation(AnimationUtils.loadAnimation(Main2Activity.this, R.anim.fade2));
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}