开发者

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)).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜