I have used Experience - Multiple Android Activities in a TabActivity to implement tab.
I have the following condition.
MainActivity extends TabActivity (Tab1,Tab2,Tab3)
TabGroup1Activity extends TabGroupActivity (class from above url)
In TabGroup1Activity:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startChildActivity("MyActivity", new Intent(this,MyActivity.class));
}
And in MyActivity.java class i used
PayPalPayment payment = SimplePayment();
Intent checkoutIntent = PayPal.getInstance().checkout(payment,
MyActivity.this,new ResultDelegate());
startActivityForResult(checkoutIntent, request);
But it doesnot execute onActivityResult method.
When i run this code in another project without tabs and activity group, it goes to onActivityResult, works fine.
what should i do to make it work here ?
Help Please !!
Your
onActivityResultis called on theActivityGroupand not on thesubActivityof yourtabgroupActivity.So override the method
onActivityResult, and then create anabstract methodon the mother class of yourSubActivities( on theTabActivityGroupi think ), and override it on each subActivity .