這就是我想要的標籤看:自定義選項卡的Android
http://img14.imageshack.us/img14/5696/tabort.png
這是他們看怎麼使用tabHost:
http://img684.imageshack.us/img684/1030/tabort2.png
所以我想周圍刪除邊框圖像。相反,我想在選項卡後面顯示灰色的背景圖像。任何人都可以幫助我這個(我是Android的新手)?
下面是一些相關的代碼:
// Create an Intent to launch an Activity for the tab
intent = new Intent().setClass(this, WashActivity.class);
// Initialize a TabSpec for each tab and add it to the TabHost
spec = tabHost.newTabSpec("washer").setIndicator("",
res.getDrawable(R.drawable.wash_tab))
.setContent(intent);
tabHost.addTab(spec);
OK我已經這樣做了,但是如何使用onClick-listeners在不同的活動之間切換?我是否像使用tabHost一樣使用Intent()? – user1378110
是的,你可以使用意圖。無論TabHost如何,意圖總是用於從一個活動到另一個活動。 –