欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android 屏幕實現(xiàn)上下翻轉(zhuǎn)

 更新時間:2017年07月06日 09:28:45   作者:oracleot  
這篇文章主要介紹了Android 屏幕實現(xiàn)上下翻轉(zhuǎn)的相關(guān)資料,需要的朋友可以參考下

Android 屏幕實現(xiàn)上下翻轉(zhuǎn)

通常我們的應(yīng)用只會設(shè)計成橫屏或者豎屏,鎖定橫屏或豎屏的方法是在manifest.xml文件中設(shè)定屬性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還可以設(shè)置成很多值:

android:screenOrientation    =     ["unspecified" | "behind" |
                   "landscape" | "portrait" |
                   "reverseLandscape" | "reversePortrait" |
                   "sensorLandscape" | "sensorPortrait" |
                   "userLandscape" | "userPortrait" |
                   "sensor" | "fullSensor" | "nosensor" |
                   "user" | "fullUser" | "locked"]

其中sensorLandscape就是橫屏根據(jù)重力上下翻轉(zhuǎn),sensorPortrait豎屏根據(jù)重力上下翻轉(zhuǎn)。

如果有興趣,你也可以試試其他的值哦...

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論