Android TabWidget White Space Issue(Android TabWidget空白问题)
问题描述
我正在处理 TabWidget,并且在 TabActivity 和 Tabs 之间出现了一个空白.
I am working on the TabWidget and i am getting a white space between the TabActivity and the Tabs.
我不知道如何删除这个空白请任何人帮助我应该如何删除它,我的 tab_main.xml 如下:
I don't know how to remove this white space please can any one help me out how should i remove it, my tab_main.xml is as follows :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0" />
</LinearLayout>
</TabHost>
我尝试将 TabWidget 的背景颜色设置为 android:color:transparent 但在 Activity 和 Tab 之间仍然存在相同的空白.
I tried to put background color of TabWidget to android:color:transparent but still same white space comes between the Activity and the Tab.
我不希望我的 Activity 和选项卡之间有任何分隔空间(可以这样做吗?)
I do not want any separation space between my Activity and the Tabs (Is it possible to do it?)
请任何人建议我如何摆脱这个空白.
Please can any one suggest me how to get rid of this white space.
推荐答案
看起来您遇到了与我在项目中遇到的类似问题,请查看 this 项目并尝试实现可绘制的 xml 文件并为您的 TabWidget 提供此项目中给出的特定自定义尺寸.它肯定对你有用.
It Look's Like you are having similar issue as i was having in my project, check out this project and try to implement the drawable xml files and provide your TabWidget with the specific custom dimensions as given in this project. It will surely work for you.
这篇关于Android TabWidget空白问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android TabWidget空白问题
基础教程推荐
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
