I am implementing Tab environment as follow :
There is one class TabScreenABCActivity extends TabActivity
,in that i have handled the tabchange functionality.
I have implemented MyTabGroupActivity extends TabGroupActivity
. From this class, i have called MyActivity like so:
startChildActivity(getResources().getString(R.string.MyActivity), new Intent(this,MyActivity.class));
Now, MyActivity extends TabGroupActivity
, from this class i called two other classes using intent like so:
Intent intent=new Intent();
intent.setClass(MyActivity.this,XYZActivity.class);
TabGroupActivity tab = (TabGroupActivity) MyActivity.this.getParent();
tab.startChildActivity("Tab", intent);
I have also overridden method to go back Activity onBackPressed()
method in each activity. But it is not working properly. Can anyone guide me on how to handle it?