Click a red heart button: xinClick is an Imageview. When the user clicks, the automatic count increases by 1, and the ID of TextView is xin. But the TextView never changes.
xinClick.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
++count;
xin.setText(count+"");//**没有效果**
}
});
This code is written in public View getView(int arg0, View arg1, ViewGroup arg2). How to solve it?
First log to see if the count is increased by one. If not, it may be that the click event was intercepted