我有一个简单的选项卡活动和下一个布局:
<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-09-09 17:12:59
将一个自定义主题应用于您的活动,并将android:windowContentOverlay属性空出。
在themes.xml中定义主题:
<style name="YourTheme" parent="if you want">
...
<item name="android:windowContentOverlay">@null</item>
...
</style>将主题应用于您的应用程序或AndroidManifest.xml中的活动:
<application android:theme="@style/YourTheme"
... >希望能帮上忙。它让我头疼..。
发布于 2010-08-27 09:29:32
在布局xml中:
<TabWidget ...
android:tabStripEnabled="false" >
...
</TabWidget>发布于 2010-08-18 12:40:43
这样做的方法似乎是在LinerLayout中嵌套tabwidget .看,here.
https://stackoverflow.com/questions/3511596
复制相似问题