I'm using TabActivity to implement tabs in my project and I want to communicate with activities of tabs and invoke some methods from tabActivity and I use method below:
CoachActivity activity=(CoachActivity) getLocalActivityManager().getActivity(mTabHost.getCurrentTabTag());
but activity
is null. CoachActivity
is Tab1 activity.
My code is a bit long so I don't post it here. I double checked everything and I'm sure the problem isn't about the setup of my tabs. I set the current tab and I checked that CoachActivity
is created.