zoukankan      html  css  js  c++  java
  • AndroidManifest.xml 屏幕上下反转

    通常我们的应用只会设计成横屏或者竖屏,锁定横屏或竖屏的方法是在AndroidManifest.xml 文件中设定属性android:screenOrientation为"landscape"或"portrait":
     
            <activity
                android:name="com.example.kata1.MainActivity"
                android:label="@string/app_name" 
                android:screenOrientation="landscape">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
     
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
     
    其实screenOrientation还可以设置成很多值:
    android:screenOrientation       =         ["unspecified" | "behind" |
                                         "landscape" | "portrait" |
                                         "reverseLandscape" | "reversePortrait" |
                                         "sensorLandscape" | "sensorPortrait" |
                                         "userLandscape" | "userPortrait" |
                                         "sensor" | "fullSensor" | "nosensor" |
                                         "user" | "fullUser" | "locked"]
     
    其中sensorLandscape就是横屏根据重力上下翻转,sensorPortrait竖屏根据重力上下翻转。
    如果有兴趣,你也可以试试其他的值哦...
  • 相关阅读:
    SOJ 3531_Number Pyramids
    TYVJ P1047 乘积最大 Label:dp
    TYVJ P1067 合唱队形 Label:上升子序列?
    TYVJ P1093 验证数独 Label:none
    TYVJ P1088 treat Label:鞭笞人的DP
    TYVJ P1008 传球游戏
    表达式系列问题
    数字三角形系列 系列问题
    TYVJ P1024 外星人的密码数字
    TYVJ P1056 能量项链 Label:环状区间DP
  • 原文地址:https://www.cnblogs.com/ADaii/p/3835245.html
Copyright © 2011-2022 走看看