The problem is I am using an animated gif image file, so when I added this gif image to an image view, it's only displaying an static image and not doing the animations.
Here is the code:
public class Animationscreen extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.animtion);
final ImageView iv = (ImageView) findViewById(R.id.imganim);
final Animation an = AnimationUtils.loadAnimation(getBaseContext(),R.anim.rotate);
final Animation an2 = AnimationUtils.loadAnimation(getBaseContext(),R.anim.abc_fade_out);
//final Context context = null;
iv.startAnimation(an);
an.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
iv.startAnimation(an2);
finish();
Intent intent=new Intent(getBaseContext(), Registeration.class);
startActivity(intent);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
}
}
any one can help solving this solution as I have tried other code also with using frame by frame and using video file or movie file but still the code is not working