I have a list view , each item has a clickable textview, when I click the textview, then change it into two buttons, if I click the outside of the textview I need the whole item can respond to click event.
I still have a worker thread to get something from internet, then update the listview.
When a worker thread notify the list view's adapter notifydatasetchange, and at the same time, I click the textview in a item of the list, but strange things happen, I click the textview but the whole item respond to the click.
I know this is caused by listview' recycle mechanism.
At the normal sitituation, when notifydatasetchanged, the listview will give up the event posted before. But some times it doesn't give up. But I want to know is there some workround to avoid this? I hope the listview's item can abandon the event that posted before notifydatasetchange.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…