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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

java - How to retrieve field values by passing field name using JPOS ISO8583 message format -