android - Refresh ListView from another activity -


i have 2 activities: "a" (my main activity listview) , "b" (is form showed dialog). when start "b" "a", need "a" not finished stay in background. then, when finish "b" need listview in "a" refreshes items. how can do? let me know if wasn't clear.

launch b activity startactivityforresult , catch result in onactivityresult. remember use unique code activity b when launched can check if response right one.

example

 intent intent= new intent(this, activityb.class);  startactivityforresult(intent, 1000);   @override protected void onactivityresult(int requestcode, int resultcode, intent data)  {      if(requestcode == 100&&resultcode=result_ok)       {         myadapter.notifydatasetchanged();     } } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -