In my Android app, I use the following code to create tabs :
mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost);
mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
mTabHost.addTab(mTabHost.newTabSpec("simple").setIndicator("Simple"),
MyFragment.class, null);
In the addTab
method, the third parameter is a Bundle object and is null
. Could I use this third parameter to pass parameters to my fragment ?
The android API documentation is empty for addTab
and does not document this parameter.