android - Listview imitates TextView likes in Moments without refreshing?
ringa_lee
ringa_lee 2017-06-19 09:07:47
0
1
1045

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?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
曾经蜡笔没有小新

First log to see if the count is increased by one. If not, it may be that the click event was intercepted

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template