Signal TabHost to reload view
I have a view that's contained inside a TabHost's FrameLayout. How can I programmatically开发者_C百科 tell the TabHost to reload the same view that's requesting it ? Something like "reset" in html.
Thanks
You can access your Tab by using LocalActivityManager and and you can access this via getLocalActivityManager().
In LocalActivityManager there are two methods available namely destroyActivity() and startActivity()..
LocalActivityManager localActivityManager = getLocalActivityManager();
localActivityManager .destroyActivity("tabid", true);
localActivityManager .startActivity("tabid", new Intent(this, YourTab.class));
Here tabid is the String which has been used in TabHost.newTabSpec(tabid)).
加载中,请稍侯......
精彩评论