Hi, I have 3 views in my application. My first view (FIRST_VIEW) has 2 buttons (BTN_2 and BTN_3). Each button will start seperate views, means BTN_2 causes to start SECOND_VIEW and BTN_3 will start THIRD_VIEW. In my FIRST_VIEW i have one onActivityResult() function. How can I set two onActivityResult() functions for each button result (that is from SECOND_VIEW and from THIRD_VIEW)? How can I specify that onActivityResult() function for each view? Please Help me..... Thank you..
A:
There is only one onActivityResult. You need to to check the resultCode and requestCode for actually identifying the activity.
startActivityForResult(intentSecond, 1002);
startActivityForResult(intentThird, 1003);
@override
void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode==1002) //it was Second Activity
else if(requestCode==1003) //it was Third Activity
}
bhups
2010-10-20 13:44:07
Hi, its working..
Miya
2010-10-20 13:51:28
Thank you so much...
Miya
2010-10-20 13:51:43