开发者

Refresh content in Tab of TabActivity

开发者 https://www.devze.com 2023-03-12 18:30 出处:网络
I have a tab with an intent as 开发者_如何学编程its content: tabHost.addTab(tabHost.newTabSpec(\"tab3\")

I have a tab with an intent as 开发者_如何学编程its content:

    tabHost.addTab(tabHost.newTabSpec("tab3")
            .setIndicator("Chart")              
            .setContent(lineChartIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));  

How is it possible to refresh the content of a tab? I am thinking of a method like

tab.refreshContent()

or similar. Background is: My intent contains a graph and I want to repaint this graph upon click of a button while the tab remains selected. Thanks.


best way i know

finish();
startActivity(getIntent());

it refresh all the Activity

0

精彩评论

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

关注公众号