

Refresh button onClick Listview data must get update in android. Do not forget to call the notifyDataChanged on the adapter object to refresh the ListView. The ArrayList has set (int index, Object newItem) method to update an item at the specified index parameter. You need to you a ArrayList to store items of the ListView. Updating an item of the ListView is simple as adding an item to the ListView. Step 2 − Add the following code to res/layout/activity_main.xml.

Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. This example demonstrates How to dynamically update a ListView on Android. How to dynamically update a ListView on Android. Android update ListView when database changes
