我是android編程的新手,我有一個方向問題。設置多個方向 - Android
我希望我的活動只能在肖像和反向肖像和方向中看到。
我以爲android:screenOrientation="portrait|reversePortrait"
會工作,但它不工作。清單文件中有沒有辦法做到這一點?
我是android編程的新手,我有一個方向問題。設置多個方向 - Android
我希望我的活動只能在肖像和反向肖像和方向中看到。
我以爲android:screenOrientation="portrait|reversePortrait"
會工作,但它不工作。清單文件中有沒有辦法做到這一點?
請檢查文檔: http://developer.android.com/guide/topics/manifest/activity-element.html#screen
在API 9+補充說縱向取向,但是可以是正常或反向肖像基於設備傳感器。所以你可以使用android:screenOrientation="sensorPortrait"
。
檢查這個 http://stackoverflow.com/a/7686539/849939 –
的人誰生活在同樣的情況在API15,你應該寫的android:screenOrientation = 「sensorPortait」 不sensorPortrait – tokiyashi