Problem Description:
The listview item has a picture, and when refreshed, the new data and the old data are no different, ImageView will still flash.
First to analyze the possible causes of the picture flashing:
1) adapter = new Willlistadapter (Myapplication.getinstance (), wills);
Regardless of whether the previous adapter has been bound to data, or the data has not changed before and after this statement executes, adapter will make the ListView redraw all item, this flashing inevitable
2) adapter.notifydatasetchanged ();
If the item corresponds to a change in data, the item is redrawn and a flashing
3) ImageView asynchronous loading may be problematic, instead volley will not appear
Solve:
This only solves the situation where the data has not changed since the refresh, but flashes.
The error code for the refresh
adapter = new Willlistadapter (Myapplication.getinstance (), wills);
Switch
if (! Wills.isempty ()) {Wills.removeall (wills);} Wills.addall (Jsontools.getobjects (Httpresult.getresult (). ToString (), would. class ) ; adapter.notifydatasetchanged ();
Done
listview resolves the flashing of the picture in item when the refresh occurs