Skip to content Skip to sidebar Skip to footer

Launch Update Of Listview Inside Appwidget When Button Is Pressed Android

I have an appwidget which contains a listview and a buton the listview gives data from remote mysql database mysql and it display it but the button I want to us it to refresh list

Solution 1:

appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds[i], R.id.listViewWidget);

add the above code in AppWidgetProvider.onUpdate method this will give call to your onDataSetChanged() method with the help of that you can refresh the listview

I had the same problem but finally solved it

Post a Comment for "Launch Update Of Listview Inside Appwidget When Button Is Pressed Android"