如何刷新TabHost活动?TabHost

2023-09-12 23:45:41 作者:少爷范儿

我有一个TabHost活动作为我的应用程序的主要活动。这TabHost包含4个活动。我怎样才能在另一活动点击按钮刷新此TabHost(或我的活动其中TabHost包括一个)。

I have a TabHost activity as main activity of my app. This TabHost contains 4 activity. How can I refresh this TabHost (or one of my activity which TabHost includes) by clicking on button in another activity.

BTW。我知道如何使按钮,等我只需要知道code刷新TabHost。

推荐答案

这标签的startActivity并要在onResume刷新()方法的活动,应该刷新您的标签活动的code。它工作正常在我的应用程序之一。

startActivity of that tab and have your code of the activity you want to refresh in onResume() method, that should refresh your tab activity. It is working fine in one of my apps.