初始化
tabHost = getTabHost(); TabSpec tabSpec = tabHost.newTabSpec("abc"); tabSpec.setIndicator("helloabc"); tabSpec.setContent(new MyViewFactory()); tabHost.addTab(tabSpec);动态更改indicator
TextView title = (TextView) tabHost.getTabWidget() .getChildAt(tabId).findViewById(android.R.id.title); title.setText("xyz"); 另外,indicator的参数也可以是view