2013-03-17 108 views

回答

0

如果您想要隱藏帶狀線,您可以創建自己的標籤指示器,然後帶狀線不會顯示出來。這將在運行時動態添加選項卡(您必須單獨構建每個選項卡)。

我想你使用TabHost(請告訴我,如果沒有)。這是一個標籤創建的例子。

// Create tab indicator (background with icon) 
LinearLayout tabIndicator = (LinearLayout)getLayoutInflater().inflate(R.layout.tab_indicator, null); 

// Create new tab spec from the TabHost 
TabSpec newTab = mTabhost.newTabSpec(FINAL_ANY_TAG).setIndicator(tabIndicator); 

newTab.setContent(R.id.tabContentXml); 

mTabhost.addTab(newTab); 

雖然tab_indicator.xml是指示燈(頂部),其中有一個背景(與壓制和未按一個slelector),你想建立一個佈局文件。

相關問題