我正在从服务器下载图像并以位图格式存储在数组中,然后我初始化帧动画并希望从我之前制作的数组中对其进行动画处理,
我面临的问题是帧动画没有动画..
final AnimationDrawable frame_anim=new AnimationDrawable();
frame_anim.addFrame(new BitmapDrawable(context.getResources(),stadium_list.get(position)), 100);
frame_anim.addFrame(new BitmapDrawable(context.getResources(),sponser_list.get(position)), 100);
stadium_image.setBackgroundDrawable(frame_anim);
frame_anim.setVisible(true, true);
frame_anim.setOneShot(false);
notifyDataSetChanged();
stadium_image.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
frame_anim.start();
Toast.makeText(context, "Animation", 1000).show();
}
}, 3000);