I want to display animated GIF images in my aplication. As I found out the hard way Android doesn\'t support animated GIF natively.
However it can display animations
Try this, bellow code display gif file in progressbar
loading_activity.xml(in Layout folder)
custom_loading.xml(in drawable folder)
here i put black_gif.gif(in drawable folder), you can put your own gif here
LoadingActivity.java(in res folder)
public class LoadingActivity extends Activity {
ProgressBar bar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loading);
bar = (ProgressBar) findViewById(R.id.progressBar);
bar.setVisibility(View.VISIBLE);
}
}