I have a list in my app. In another activity, user deletes a row from database and it returns to the main activity (I use finish() here). When it returns back, the row that has been removed from database is still on the list. If user presses refresh button, it disappears.
How can I refresh it automatic?
I have a list in my app. In another activity, user deletes a row
Share
Override your original Activity’s (the one that is showed when the user presses back)
onResume(), so it looks like:refreshListMethod();is whatever approach you chose to refresh the List since you say:So turn that approach into a method so you can use it wherever needed.