android - getLocalActivityManager().getActivity(tabTag) return NULL -
I have 2 tabs with the tag ID "tag01" and "tag02". I have explicitly tabHost.setCurrentTab (0)
Calling on the first tab is focused when I call Now when I run my app again and this time, click on the second tab and then Thanks Activity has not been created! If you have the In this way, the tab is the first tab displayed (with index 0) and getLocalActivityManager (). GetActivity ("tag01") I get the purpose of the activity but when I call
getLocalActivityManager () GetActivity ("tag02") I get the tap // log.i("tab position: ", getLocalActivityManager (). GetActivity (" tag02 ") +" "); Prints blank // log.i ("tab status:", getLocalActivityManager (). GetActivity ("tag01") + ""); Print com.test.TestActivity@437c06c8
getLocalActivityManager (). GetActivity ("tag02") returns the object (in toString () logcat) so after checking it again I found that "only activity in the first tab (which i used to do
tabHost.setCurrentTab (0) ) explicitly focused) non-blank "do not click on the tab when I click on all the tabs, then at least click on all tabs and click them
getLocalActivityManager () Can get it. GetActivity (anyTag) object return (I'm tracing for string ()). How to use the activity of other tabs without clicking on other tabs, as the user will not know that he has to click the tab. Please give some suggestion because using my activity in the tab in my app, I hope you understand my problem.
n tab, then you can do it in your create ():
for
(int i = n -1; i & gt; 0; i--) tabHost.setCurrentTab (i);
getLocalActivityManager (). GetActivity (anyTag) will return non-empty
Comments
Post a Comment