I'm displaying a widget with a listview. When I need to refresh the listview data I'm calling the following code
appWidgetManager.notifyAppWidgetViewDataChanged(widgetIds, R.id.list);
This works fine except that the listview flickers a lot every time this is called. Is there a way to prevent this?
EDIT: After doing a lot of test it looks like the flickering only happens when I display an imageview in the listview rows using the following code
view.setImageViewBitmap(R.id.thumbnail, bitmap);
For some reasons using
views.setImageViewUri(R.id.thumbnail, uri);
instead of
view.setImageViewBitmap(R.id.thumbnail, bitmap);
fixes the issue. No more flickering when refreshing the listview content of a widget