开发者

How can I switch the activity of the content of a tab in Tabhost

开发者 https://www.devze.com 2022-12-13 07:17 出处:网络
I have created a TabHost and in 1 of the tab, I have added the content using mTabHost.addTab(mTabHost.newTabSpec(\"tab1\")

I have created a TabHost and in 1 of the tab, I have added the content using

 mTabHost.addTab(mTabHost.newTabSpec("tab1")
                .setIndicator(getString(R.string.dialerIconLabel),
                        getResources().getDrawable(R.drawable.ic_tab_dialer))
                .setContent(intent));

Is it possible for me to switch the content's activity programati开发者_运维知识库cally after I called 'addTab of TabHost'?

Thank you.


You cannot readily change what View is the content of the tab. However, that View could be a ViewFlipper, or a FrameLayout with only one visible child, which can give you a similar visual effect.

0

精彩评论

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