我想摆脱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中的水平滚动条?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)