2017-11-15 1 views
0

Ich muss Splash-Bildschirm in Android animieren und ich habe einen Kreis in der Mitte des Bildschirms, und ich möchte, dass zu dehnen, um den gesamten Bildschirm auf eine animierte Art und Weise zu füllen.Wie mache ich es ?Machen Stretch-Animation in Android

Antwort

1

Sein Anruf Maßstab Animations Sie es so, dass

ScaleAnimation scal=new ScaleAnimation(0, 1f, 0, 1f, Animation.RELATIVE_TO_SELF, (float)0.5, Animation.RELATIVE_TO_SELF, (float)0.5); 
    scal.setDuration(1000); 
    scal.setFillAfter(true); 
    YOUR_VIEW.setAnimation(scal); 

YOUR_VIEW tun können, ist die Ansicht Ihrer xml (wie Image), die Sie Animation ausführen möchten.