0
我想在listitem按钮上显示一个动画。动画效果很好。我没有点击的其他按钮也显示动画。我发现问题将出现在适配器的回收视图中。谁能帮我处理这种情况。这里是我写的代码:适配器getview方法中:listview的适配器不工作perefct
viewHolder.getrate.setOnClickListener(
new CompoundButton.OnClickListener() {
public void onClick(View paramView) {
ListData rateobj = (ListData) viewHolder.getrate.getTag();
paramView.setBackgroundResource(R.drawable.spin_animation);
// Get the background, which has been compiled to an AnimationDrawable object.
frameAnimation = (AnimationDrawable) paramView.getBackground();
// Start the animation (looped playback by default).
frameAnimation.start();
NetworkRun nt = new NetworkRun(rateobj);
String number=rateobj.getDescription();
String num=number.replaceAll("\\s+","");
nt.execute(num);
viewHolder.load.setEnabled(true);
viewHolder.load.setVisibility(View.VISIBLE);
}
});