Get rid of the line under TabWidget

末鹿安然 提交于 2019-11-28 07:40:06
csati

Apply a custom theme to your activity, and null out the android:windowContentOverlay attribute.

Define a theme in themes.xml:

<style name="YourTheme" parent="if you want">
  ...   
  <item name="android:windowContentOverlay">@null</item>
  ...
</style>

Apply the theme on your application or the activity in AndroidManifest.xml:

<application android:theme="@style/YourTheme"
  ... >

Hope it helps. It caused me lots of headache...

In your layout xml:

<TabWidget ... 
    android:tabStripEnabled="false" >

 ... 

</TabWidget>
Sephy

It seems that the way of doing that is to nest the tabwidget in a LinerLayout... Look here.

Unfortunately you can't get rid of it. This is a result of how the TabWidget is implemented. Internally the TabWidget is an ActivityGroup and the contents of each tab is its own Activity.

What I suggest you is to use the library provided by GrreenDroid: http://android.cyrilmottier.com/?p=274

Just have a look at The GDTabActivity, you will be able to tweak everything and get rid of this Bar.

http://android.cyrilmottier.com/medias/actionbar/action_bar_4.png

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!