Question

Suppose , i have a tab activity consist of a TabHost. The TabHost contains 2 tabs, each of two has an activity group of it. Each activity group contains of one activity. Now , say , Tab Activity is a class A. Two activity groups are class B & class C. B & C , each contains class D & class E. So the hierarchy is,

   A
|       |
B     C
|       |
D     E

Now , I want to call a function of class E from Class A when A's onPaused function is called. I tried to get Activity E using local activity manager but got no success. Beside, looked at some possible solution here & on Google also but my luck haven't favored yet. :( So now , i hope my explanation above is clear enough to make people understand exactly what i want. Please guys , help me on the issue with some samples , codes or hints.

Was it helpful?

Solution

I got my solution from here. If say more specifically , solved by the block of codes below.

ActivityTab1 activity = (ActivityTab1) getLocalActivityManager().getActivity("Tab1");
activity.refreshContent();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top