Android: get activity from a tab or intent?

my application uses a tab bar, each tab button associates an action, so when you click on the tab button, it shows a screen for this action, now it needs to detect that the user clicks on the current / active tab button, you have already completed the code to detect this, but now I need to report the corresponding click activity, is there a way to get the activity associated with the tab button? Or can I start with intention if I have a reference to the intention?

Thank!

+3
source share
1 answer

A bit late for your answer, but you can try:

String tabTag = getTabHost().getCurrentTabTag(); 
Activity activity = getLocalActivityManager().getActivity(tabTag); 
+3
source

All Articles