how to return to fragment in android fragmentTabHost -
i have paint problem:
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
Post a Comment