here’s my questions:
i have a normal tabactivity, with my three tabs defined like this one:
TabSpec listatabs= tabHost.newTabSpec("App");
listatabs.setIndicator("Lista", getResources().getDrawable(R.drawable.mia_lista));
Intent listaIntent = new Intent(this, MIALISTA.class);
listaIntent .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
listatabs.setContent(listaIntent );
// Aggiungo i tabs
tabHost.addTab(listatabs);
the problem is: if the user go in this tab (which have a list of items), and click on a item, i must call a new intent to display the content (and of course a new .class)… but i must remain in the intrested tab.
how can i implement this idea?
Use a custom ActivityGroup:
Make a class TabGroupActivity:
in your custom Activity, for example ‘HomeTabGroupActivity’:
in Activity A, use this to go to activityB:
and let the tab take you to ‘HomeTabGroupActivity’
Let me know if you want to use startActivityForResult within the tabgroup, ill post a little fix for that.