如何删除选项卡小部件之间的空格? [英] How can I remove the space between tab widget?
本文介绍了如何删除选项卡小部件之间的空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想删除 tabwidgets 之间的间距.默认情况下,选项卡之间的间距约为 1px.我知道诸如foursquare或posterous之类的一些应用程序能够删除它.执行此操作的代码如何?我正在使用 2.3 API.
I would like to remove the spacing between tabwidgets. By default there is around 1px spacings between tabs. I know some apps like foursquare or posterous are able to remove it. How is the code to do this would look like? I am using 2.3 API.
感谢您的帮助
推荐答案
可以使用getTabHost().getTabWidget().setDividerDrawable(R.drawable.empty_divider)方法,其中R.drawable.empty_divider 0px大小的简单形状,如
You can use getTabHost().getTabWidget().setDividerDrawable(R.drawable.empty_divider) method, where R.drawable.empty_divider simple shape with 0px size, such as
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<size
android:width="0px"
android:color="@android:color/black"
android:dashWidth="0px"
android:dashGap="0px" />
</shape>
这篇关于如何删除选项卡小部件之间的空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文