android-如何摆脱tabhost中的水平滚动条?

android-如何摆脱tabhost中的水平滚动条?,第1张

概述我想摆脱TabHost中的水平滚动条.即使TabWidget在顶部,它也在那里.alttexthttp://img341.imageshack.us/img341/1879/brokentabs.png下面是我的xml布局.<?xmlversion="1.0"encoding="utf-8"?><TabHostxmlns:android="http://schemas.android.com/apkes/andro

我想摆脱TabHost中的水平滚动条.即使TabWidget在顶部,它也在那里.

alt text http://img341.imageshack.us/img341/1879/brokentabs.png

下面是我的xml布局.

<?xml version="1.0" enCoding="utf-8"?><TabHost xmlns:androID="http://schemas.androID.com/apk/res/androID"androID:ID="@androID:ID/tabhost"androID:layout_wIDth="fill_parent"androID:layout_height="fill_parent" >     <FrameLayout        androID:ID="@androID:ID/tabcontent"        androID:layout_wIDth="fill_parent"             androID:layout_height="fill_parent"/>                     <TabWidget        androID:ID="@androID:ID/tabs"                             androID:layout_wIDth="fill_parent"        androID:layout_height="fill_parent"        androID:gravity="bottom" /></TabHost>

解决方法:

将其嵌套到linearlayout中

    <linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"        androID:orIEntation="vertical"    androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent"    androID:gravity="center_horizontal">         <TabHost     androID:ID="@androID:ID/tabhost"        androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent"    >.........    </TabHost>    </linearLayout>
总结

以上是内存溢出为你收集整理的android-如何摆脱tabhost中的水平滚动条?全部内容,希望文章能够帮你解决android-如何摆脱tabhost中的水平滚动条?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1082176.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存