Add:Device setting for locking screen orientation #449

This commit is contained in:
advplyr
2022-12-04 10:41:09 -06:00
parent af216d9b38
commit 9687f47b6b
12 changed files with 100 additions and 7 deletions
@@ -6,6 +6,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo
enum class LockOrientationSetting {
NONE, PORTRAIT, LANDSCAPE
}
data class ServerConnectionConfig(
var id:String,
var index:Int,
@@ -22,7 +26,8 @@ data class DeviceSettings(
var enableAltView:Boolean,
var jumpBackwardsTime:Int,
var jumpForwardTime:Int,
var disableShakeToResetSleepTimer:Boolean
var disableShakeToResetSleepTimer:Boolean,
var lockOrientation:LockOrientationSetting
) {
companion object {
// Static method to get default device settings
@@ -32,7 +37,8 @@ data class DeviceSettings(
enableAltView = false,
jumpBackwardsTime = 10,
jumpForwardTime = 10,
disableShakeToResetSleepTimer = false
disableShakeToResetSleepTimer = false,
lockOrientation = LockOrientationSetting.NONE
)
}
}
+4
View File
@@ -2,5 +2,9 @@
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<access origin="*" />
<feature name="CDVOrientation">
<param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation"/>
</feature>
</widget>