@@ -15,21 +15,33 @@ npm install react-native-folding-feature
15
15
16
16
Android set screen orientation at AndroidManifest.xml
17
17
18
- example: android: screenOrientation ="fullSensor"
18
+ ```
19
+ android:screenOrientation="fullSensor"
20
+ ```
19
21
20
22
21
- ### warp App component with FoldingFeatureProvider
23
+ ### Warp App component with FoldingFeatureProvider
22
24
``` tsx
23
25
import { FoldingFeatureProvider } from ' react-native-folding-feature' ;
24
26
25
27
...
26
- <FoldingFeatureProvider >
28
+ <FoldingFeatureProvider option = { options } >
27
29
... app component ...
28
30
</FoldingFeatureProvider >
29
31
...
30
32
31
33
```
32
34
35
+
36
+ ### Options
37
+ | Prop | Type | Default | Description |
38
+ | ---- | ---- | --------| ----------- |
39
+ | closeAngle | number | 20 | Specifies the angle for close pose
40
+
41
+
42
+
43
+
44
+
33
45
### Get the folding feature information
34
46
35
47
``` js
@@ -40,6 +52,16 @@ const { layoutInfo, isTableTop, isBook } = useFoldingFeature();
40
52
...
41
53
```
42
54
55
+ ### useFoldingFeature Props
56
+ | Prop | Type | Default | Description |
57
+ | ------| ------| ---------| -------------|
58
+ | layoutInfo | LayoutInfo | | Folding Feature from [ android doc] ( https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature ) |
59
+ | hingeAngle | number | 180 | (range 0 - 180) acquire from [ SensorManager] ( https://developer.android.com/reference/android/hardware/Sensor#TYPE_HINGE_ANGLE ) |
60
+ | isTableTop | boolean | false | HALF_OPENED & HORIZONTAL |
61
+ | isBook | boolean | false| HALF_OPENED & VERTICAL |
62
+ | isFlat | boolean | true | |
63
+ | isClosed | boolean | false | hingeAngle < closeAngle (default 20)|
64
+
43
65
44
66
## Contributing
45
67
0 commit comments