I have a TabActivity class which uses Intents to populate the content view. Under certain conditions, I would like to intercept a tab selection event, put up a message dialog, suppress the selected Intent, and revert to the original tab selected.
I want the TabActivity content to remain Intent driven (rather than using Views).
I suspect this may require extension of the LocalActivityManager.
Has anyone ever accomplished this or done a similiar thing?
// simple example of current code:
TabHost tabHost = getTabHost();
TabSpec ts = tabHost.newTabSpec(tag);
ts.setIndicator(tabview);
ts.setContent(new Intent().setClass(this, AHome.class));
tabHost.addTab(ts);
Thanks!
I wouldn't look in the TabActivity for the answer (even Google staff admit that this API is broken). Here's what I do - in the target activity, I'd check this condition in the onCreate, if the condition is satisfied, continue, if no - activate the previous activity