Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity in TabHost

I use a TabHost. The below code to call AActivity.

intent = new Intent().setClass(this, AActivity.class);
spec = tabHost.newTabSpec("A").setIndicator("A", res.getDrawable(R.drawable.icon)).setContent(intent);
tabHost.addTab(spec);

And it is in the tab. But in AActivity I call BActivity. The BActivity will open new page, but not in the tab. How to let it on the tab frame? AActivity use below code to call BActivity:

it = new Intent(this, BActivity.class);
startActivity(it);
like image 323
brian Avatar asked Feb 22 '23 23:02

brian


1 Answers

If you want to open multiple activity in Tab then on Place of activity use Activity group for par tab and switch view in this activity group for open multiple Activity in single tab

you can take some help from this tutorial

like image 135
loks Avatar answered Mar 04 '23 09:03

loks