I realize, if there is only 1 item in home widget list view, there will be flickering issues, if we perform
appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, android.R.id.list_view);
Note that, if there is 2 or more items in the home widget list view, the problem will gone ?!
Note, I had resize the widget to 4x4. (Size doesn't matter. Even flickering can be observed even I were using 4x2)
I use WeatherListWidget as example
If we were changing
sData.add(new WeatherDataPoint("Monday", 13));
sData.add(new WeatherDataPoint("Tuesday", 1));
...
sData.add(new WeatherDataPoint("Sunday", 27));
to single
sData.add(new WeatherDataPoint("Monday", 13));
flickering problem can be easily seen. (By pressing refresh button on top right)
If I look carefully, I suspect I saw "Loading..." text in between as described in
Homescreen widget, listView shows "Loading"
May I know why the problem only happen when there is 1 list view item? Is there any workaround to overcome this?