动态更换tab indicator初始化tabHost getTabHost() ?TabSpec tabSpec tabHost.newTabSpec(abc)?ta
动态更换tab indicator
初始化
tabHost = getTabHost(); ?
TabSpec tabSpec = tabHost.newTabSpec("abc");?
tabSpec.setIndicator("helloabc");?
tabSpec.setContent(new MyViewFactory());?
tabHost.addTab(tabSpec);?
我想动态更换为
TabSpec tabSpec = MyTabActivity.getTabSpec();?
tabSpec.setIndicator("xyz");?
可是上面的方法不好用
要想修改需要用:
TextView title = (TextView) tabHost.getTabWidget().getChildAt(tabId).findViewById(android.R.id.title)?
title.setText("xyz");?
