2011-10-05 23 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)方法來獲得所需的外觀。