如何设置android显示垂直方向?

如何设置android显示垂直方向?,第1张

概述从以下.xml文件中我设置xml以显示TabHost,但是在我在模拟器上运行它后,它同时显示两个方向.我想将其设置为仅显示一个方向.我该怎么办?谢谢.<TabHostxmlns:android="http://schemas.android.com/apkes/android"android:id="@android:idabhost"android:layout_width

从以下.xml文件中我设置xml以显示TabHost,但是在我在模拟器上运行它后,它同时显示两个方向.我想将其设置为仅显示一个方向.我该怎么办?谢谢.

<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"    androID:orIEntation="vertical">    <relativeLayout         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="fill_parent"             androID:layout_alignParenttop="true"              androID:layout_above="@androID:ID/tabs" />    <TabWidget androID:ID="@androID:ID/tabs"             androID:layout_wIDth="fill_parent"              androID:layout_height="wrap_content"             androID:layout_alignParentBottom="true" />    </relativeLayout></TabHost>

解决方法:

在manifest.xml文件中添加此行.

<activity androID:name=".activity"  androID:screenorIEntation="portrait"></activity>

如果您只想横向定位,则更改为横向而不是纵向

总结

以上是内存溢出为你收集整理的如何设置android显示垂直方向?全部内容,希望文章能够帮你解决如何设置android显示垂直方向?所遇到的程序开发问题。

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

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

原文地址:https://54852.com/web/1101917.html

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

发表评论

登录后才能评论

评论列表(0条)

    保存