I wanted to do app with tabhost. Every tab has other layout. And in every layout I want to use other activities. Is it possible? How to do it?
I've done something like this:
myTabHost =(TabHost) findViewById(R.id.TabHost);
myTabHost.setup(this.getLocalActivityManager());
// Adding tabs
// tab1 settings
TabSpec spec = myTabHost.newTabSpec("tab_creation");
spec.setIndicator("Strona główna",getResources().getDrawable(android.R.drawable.ic_menu_add));
Intent i = new Intent().setClass(this, WelcomeActivity.class);
spec.setContent(i);
myTabHost.addTab(spec);
// otherwise :
Intent j = new Intent().setClass(this, DrugsActivity.class);
myTabHost.addTab(myTabHost.newTabSpec("tab_inser").setIndicator("Lista leków",getResources().getDrawable(android.R.drawable.ic_menu_edit)).setContent(j));
Intent k = new Intent().setClass(this, SymptomsActivity.class);
myTabHost.addTab(myTabHost.newTabSpec("tab_affiche").setIndicator("Objawy",getResources().getDrawable(android.R.drawable.ic_menu_view)).setContent(k));
myTabHost.setCurrentTab(0);
But now it looks that app show me every layout on ONE screen. They're superposed... I haven't idea what to change cause I just start my adventure with android&java. Could anyone help me?