我的类扩展扩展TabActivity
My class extends extends TabActivity
TabHost mTabHost = getTabHost();
TabHost.TabSpec tab1 =mTabHost.newTabSpec("tab1");
TabHost.TabSpec tab2 =mTabHost.newTabSpec("tab2");
tab1 .setIndicator("title tab1");
tab2 .setIndicator("title tab2");
mTabHost.addTab(tab1);mTabHost.addTab(tab2);
TabHost.setCurrentTab(0 or 1)
任何人都可以指导我如何更改背景图像或所选标签的颜色?
Can anybody guide me how do I change the background image or color of selected tab?
如果您注册什么的TabHost.OnTabChanged事件,并呼吁mTabHost.getCurrentTabView()来获取视图,然后view.setBackgroundResource()?
What if you register for TabHost.OnTabChanged events and call mTabHost.getCurrentTabView() to get the View, then view.setBackgroundResource()?
上一篇:从另一个活动完成的活动
下一篇:写权限到SD卡权限、SD