So, my application have one activity ProjectActivity as a home, which contains 3 fragments HomeFragment ListFragment TagFragment(one for each tab). When I click on a button (on the homeFragment), it opens a new activity CaptureActivity.
That activity launches an ASyncTask, ParseData.
On the ParseData onPostExecute, I would like to go back to my ProjectAcitity, focused on a specified tab (the one that contain ListFragment), and update the ListFragment View.
I actually have no clue on how to do that. Do I simply need to call the ProjectActivity ? But then, if I press the Back button, wouldn’t it go back through the whole chain (Project Activity, CaptureActivity, ProjectActivity) ?
Well, you can do a few things.
First just have ListFragment monitor w/e its listing and refresh it in its onStart/onResume which will be called when you return to your ProjectActivity.
Or more directly you could do startActivityForResult(captureActivity); then when u come back to your ProjectActivity get results in onActivityResults() then update your ListFragment from there.