react-native-sheet2 1.2.2 → 1.2.3
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.
|
@@ -39,8 +39,8 @@ class AppFittedSheet(context: Context) : ViewGroup(context), LifecycleEventListe
|
|
|
39
39
|
field = value
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
private val
|
|
43
|
-
get() = params.bool("
|
|
42
|
+
private val dismissable: Boolean
|
|
43
|
+
get() = params.bool("dismissable", true)
|
|
44
44
|
private val topLeftRightCornerRadius: Float
|
|
45
45
|
get() = params.float("topLeftRightCornerRadius", 0f)
|
|
46
46
|
private val backgroundColor: Int
|
|
@@ -65,7 +65,7 @@ class AppFittedSheet(context: Context) : ViewGroup(context), LifecycleEventListe
|
|
|
65
65
|
if (sheet == null) {
|
|
66
66
|
val fragment = FragmentModalBottomSheet(
|
|
67
67
|
modalView = mHostView,
|
|
68
|
-
|
|
68
|
+
dismissable = dismissable,
|
|
69
69
|
isSystemUILight = isSystemUILight
|
|
70
70
|
) {
|
|
71
71
|
println("😀 onDismiss")
|
|
@@ -13,7 +13,7 @@ import java.lang.ref.WeakReference
|
|
|
13
13
|
|
|
14
14
|
class FragmentModalBottomSheet(
|
|
15
15
|
private val modalView: ViewGroup,
|
|
16
|
-
private val
|
|
16
|
+
private val dismissable: Boolean,
|
|
17
17
|
private val isSystemUILight: Boolean,
|
|
18
18
|
private val onDismiss: () -> Unit
|
|
19
19
|
) : BottomSheetDialogFragment() {
|
|
@@ -29,7 +29,7 @@ class FragmentModalBottomSheet(
|
|
|
29
29
|
): View = modalView
|
|
30
30
|
|
|
31
31
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
|
32
|
-
this.isCancelable =
|
|
32
|
+
this.isCancelable = dismissable
|
|
33
33
|
val dialog = CustomBottomSheetDialog(requireContext(), R.style.AppBottomSheetDialog)
|
|
34
34
|
dialog.setSheetBackgroundColor(Color.TRANSPARENT)
|
|
35
35
|
dialog.window?.let {
|
package/package.json
CHANGED
package/src/FittedSheet.tsx
CHANGED
|
@@ -14,7 +14,7 @@ export const _FittedSheet = requireNativeComponent<any>('SheetView');
|
|
|
14
14
|
|
|
15
15
|
export interface FittedSheetParams {
|
|
16
16
|
readonly applyMaxHeightToMinHeight?: boolean;
|
|
17
|
-
readonly
|
|
17
|
+
readonly dismissable?: boolean;
|
|
18
18
|
readonly maxPortraitWidth?: number;
|
|
19
19
|
readonly maxLandscapeWidth?: number;
|
|
20
20
|
readonly maxHeight?: number;
|