下襬脫了線的我得到了與下一個簡單的佈局選項卡活動:TabWidget
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff00" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff00" />
我使用的按鈕作爲標籤
tabHost.addTab(tabHost.newTabSpec("Tab1")
.setIndicator(new Button(this))
.setContent(new Intent(this, TabActivity1.class)));
tabHost.addTab(tabHost.newTabSpec("Tab2")
.setIndicator(new Button(this))
.setContent(new Intent(this, TabActivity2.class)));
在這種情況下,指標的FrameLayout總是有黑線和陰影在上面的效果(你可以看到它下面的按鈕):
問題是:我該如何擺脫這條線?在Android資源中繪製它的方法在哪裏?
雖然這也爲當前活動刪除了窗口內容疊加層。有沒有辦法只刪除標籤主機的意圖覆蓋? – 2010-12-07 15:14:59
工程就像一個魅力! – rogcg 2011-08-23 19:37:11
完美解決方案! – vanleeuwenbram 2012-01-30 12:13:44