2015-02-10 71 views

回答

4

可以檢查Settings.System.ACCELEROMETER_ROTATION設置的值,像這樣:

final int rotationState = android.provider.Settings.System.getInt(
    getContentResolver(), 
    Settings.System.ACCELEROMETER_ROTATION, 0 
); 

啓用自動旋轉,這個值等於1(否則爲0)。

相關問題