【问题标题】:Tablet devices loading wrong orientation平板设备加载方向错误
【发布时间】:2013-07-03 19:33:33
【问题描述】:

我的应用只使用一个页面作为主要活动,并且在清单中它被设置为不允许旋转,因此无论您是否旋转设备,方向都保持不变。但是在平板电脑上,当用户处于横向并运行应用程序时。该应用程序加载默认方向(纵向),但在横向视图中,我只看到一半的屏幕。 帮助。 这是我在清单中的活动的一部分,我使用 nosensor 来禁用旋转。

<activity
        android:name="com.paul.xicon.MainActivity"
        android:windowSoftInputMode="adjustPan"
        android:label="@string/app_name"
        android:screenOrientation="nosensor">

【问题讨论】:

    标签: android android-layout


    【解决方案1】:

    我不确定您是如何禁用屏幕旋转的。但这在清单的活动标签中应该可以正常工作。

    android:screenOrientation="landscape" (disables the screen-rotation & restricts to landscape mode)
    
    or,
    
    android:screenOrientation="portrait" (disables the screen-rotation & restricts to portrait mode)
    

    【讨论】:

    • 在AndroidManifest.xml里面的
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多