how to return to fragment in android fragmentTabHost -


i have paint problem:

enter image description here

do know solution?

start activityb activitya using startactivityforresult.

int request_code = 99; // random number here startactivityforresult(activityaintent, request_code); 

1) in activityb call:

  setresult(result_ok);   finish(); 

2) in activitya catch result_ok activityb:

@override protected void onactivityresult(int requestcode, int resultcode, intent data) {     // check request we're responding     if (requestcode == request_code) {         // make sure request successful         if (resultcode == result_ok) {            // finish activitya , navigate fragmenta            setresult(result_ok);            finish();         }     } } 

other solution if don't need activitya after start activityb, call finish() in activitya start activityb. having can call finish() in activityb , user navigated fragmenta expected.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -