View.getBackground()返回null
if(mAnimView != null){
mAnimView.setBackgroundResource(R.drawable.adj);
mAnimView = null;
}
mAnimView = (ImageView) view.findViewById(R.id.view_anim);
mAnimView.setBackgroundResource(R.drawable.play_ainim);
mAnimView.post(new Runnable() {
@Override
public void run() {
AnimationDrawable anim = (AnimationDrawable)(mAnimView.getBackground());//这里一直为null
anim.start();
}
});
已经尝试了将view改为imageview然后通过getDrawable获取,仍然为空,通过view.post也不行。求救!