Bonjour à tous,
Dans mon application, j'anime des textView, pour cela j'ai deux méthodes :
Ces méthodes définissent les animations d'entrées/sorties des textView, je souhaite enchainer les deux animation :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 private void RunAnimations() { Animation a = AnimationUtils.loadAnimation(this, R.anim.rotate); a.reset(); TextView tv = (TextView) findViewById(R.id.checkedTextView1); tv.clearAnimation(); tv.startAnimation(a); } private void RunAnimationsFin() { Animation a = AnimationUtils.loadAnimation(this, R.anim.rotate_fin); a.reset(); TextView tv = (TextView) findViewById(R.id.checkedTextView1); tv.clearAnimation(); tv.startAnimation(a); }
mais le problème que e rencontre c'est que visuellement il la méthode placée en deuxième (ici RunAnimation()) "masque" la première. En gros c'est comme si le programme ne prennait pas en compte la première méthode....
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 .... du code... RunAnimationFin(); RunAnimation(); ....d'autre code...
Quelqu'un sait comment dire à l'application d'attendre que la méthode "RunAnimationFin()" finisse de s'executer avant que celle de "RunAnimation()" ne commence ??
Merci![]()
Partager