2011-10-05 44 views

回答

3

你试过吗?

对于标签无图标

spec = tabHost.newTabSpec("artists").setIndicator("Artists",null) 
        .setContent(intent); 

对于标签没有文字

spec = tabHost.newTabSpec("artists").setIndicator("", 
         res.getDrawable(R.drawable.ic_tab_artists)) 
        .setContent(intent); 

当然,这些都是他们做的只是李途。对于更复杂的选项卡视图,您可能需要自定义视图并使用setIndicator (View view)方法来获得所需的外观。