schleife für image view animations

H

Hendrix95

Neues Mitglied
0
hallo :)

hab hier nen funktionierenden code ( hässlich ohne ende ) und bekomm keine antändige schleife dafür hin könnte mir jemand helfen?
des Problem ist, dass ich nicht weiß wie ich die ImageViews nacheinander Aufrufe und die Animation für jedes dann Starten kann.
wär top wenn mir jemand Helfen könnte.
Code:
  private void cloud2() {
        ImageView images = (ImageView) findViewById(R.id.cloudstart2);
        TranslateAnimation animation = new TranslateAnimation(-stageWidth, stageWidth,
                0.0f, 0.0f);
        animation.setDuration(13000);
        animation.setRepeatCount(200);
        animation.setRepeatMode(1);
        animation.setFillAfter(true);
        images.startAnimation(animation);

}

    private void cloud3() {
        ImageView images = (ImageView) findViewById(R.id.cloudstart3);
        TranslateAnimation animation = new TranslateAnimation(-stageWidth, stageWidth,
                0.0f, 0.0f);
        animation.setDuration(13500);
        animation.setRepeatCount(200);
        animation.setRepeatMode(1);
        animation.setFillAfter(true);
        images.startAnimation(animation);

    }

    private void cloud4() {
        ImageView images = (ImageView) findViewById(R.id.cloudstart4);
        TranslateAnimation animation = new TranslateAnimation(-stageWidth, stageWidth,
                0.0f, 0.0f);
        animation.setDuration(14500);
        animation.setRepeatCount(200);
        animation.setRepeatMode(1);
        animation.setFillAfter(true);
        images.startAnimation(animation);

    }

    private void cloud5() {
        ImageView images = (ImageView) findViewById(R.id.cloudstart5);
        TranslateAnimation animation = new TranslateAnimation(-stageWidth, stageWidth,
                0.0f, 0.0f);
        animation.setDuration(16500);
        animation.setRepeatCount(200);
        animation.setRepeatMode(1);
        animation.setFillAfter(true);
        images.startAnimation(animation);

    }
 
Zuletzt bearbeitet von einem Moderator:
Bearbeitet von: Kiwi++Soft - Grund: Bitte Code-Tags verwenden!

Ähnliche Themen

Manny87
  • Manny87
Antworten
11
Aufrufe
162
swa00
swa00
B
Antworten
4
Aufrufe
486
bb321
B
netfreak
  • netfreak
Antworten
10
Aufrufe
456
netfreak
netfreak
Zurück
Oben Unten