@capacitor/screen-orientation 5.0.0-alpha.1 → 5.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-beta.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-orientation@5.0.0-alpha.1...@capacitor/screen-orientation@5.0.0-beta.0) (2023-03-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **screen-orientation:** Add native implementation for landscape and any ([#1517](https://github.com/ionic-team/capacitor-plugins/issues/1517)) ([d5d4584](https://github.com/ionic-team/capacitor-plugins/commit/d5d4584a2f2f17ea80fd6d6139991ecc6edbd4c8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [5.0.0-alpha.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-orientation@4.1.0...@capacitor/screen-orientation@5.0.0-alpha.1) (2023-03-16)
|
|
7
18
|
|
|
8
19
|
|
package/android/build.gradle
CHANGED
|
@@ -11,13 +11,14 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:7.
|
|
14
|
+
classpath 'com.android.tools.build:gradle:7.4.1'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
+
namespace "com.capacitorjs.plugins.screenorientation"
|
|
21
22
|
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
22
23
|
defaultConfig {
|
|
23
24
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
package/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java
CHANGED
|
@@ -57,6 +57,9 @@ public class ScreenOrientation {
|
|
|
57
57
|
|
|
58
58
|
private int fromOrientationTypeToEnum(String orientationType) {
|
|
59
59
|
switch (orientationType) {
|
|
60
|
+
case "any":
|
|
61
|
+
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
|
62
|
+
case "landscape":
|
|
60
63
|
case "landscape-primary":
|
|
61
64
|
return ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
|
62
65
|
case "landscape-secondary":
|
|
@@ -82,7 +82,9 @@ public class ScreenOrientation: NSObject {
|
|
|
82
82
|
|
|
83
83
|
private func fromOrientationTypeToMask(_ orientationType: String) -> UIInterfaceOrientationMask {
|
|
84
84
|
switch orientationType {
|
|
85
|
-
case "
|
|
85
|
+
case "any":
|
|
86
|
+
return UIInterfaceOrientationMask.all
|
|
87
|
+
case "landscape", "landscape-primary":
|
|
86
88
|
return UIInterfaceOrientationMask.landscapeLeft
|
|
87
89
|
case "landscape-secondary":
|
|
88
90
|
return UIInterfaceOrientationMask.landscapeRight
|
|
@@ -96,7 +98,9 @@ public class ScreenOrientation: NSObject {
|
|
|
96
98
|
|
|
97
99
|
private func fromOrientationTypeToInt(_ orientationType: String) -> Int {
|
|
98
100
|
switch orientationType {
|
|
99
|
-
case "
|
|
101
|
+
case "any":
|
|
102
|
+
return UIInterfaceOrientation.unknown.rawValue
|
|
103
|
+
case "landscape", "landscape-primary":
|
|
100
104
|
return UIInterfaceOrientation.landscapeLeft.rawValue
|
|
101
105
|
case "landscape-secondary":
|
|
102
106
|
return UIInterfaceOrientation.landscapeRight.rawValue
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/screen-orientation",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-beta.0",
|
|
4
4
|
"description": "The Screen Orientation API provides methods to lock and unlock the screen orientation.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "d53b649da594ee7e30d7cff4f7cdb87ba6a436b5"
|
|
83
83
|
}
|