android - How do I refresh connected fragments accordingly? -


i'm making simple notepad app. in 1 fragment there's list view of added notes , when note selected other fragment shows details of note. if user clicks delete button note deleted, how refresh list view , detail view accordingly?

for refreshing listview have refresh underlaying adapter.

this workflow of scenario:

  1. remove selected item
  2. call notifydatasetchanged()
  3. set item current one, example previous note or first one.

and that's it.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -