@lodev09/react-native-true-sheet 1.1.0 → 1.1.1
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.
|
@@ -103,7 +103,17 @@ class TrueSheetDialog(private val reactContext: ThemedReactContext, private val
|
|
|
103
103
|
* Setup background color and corner radius.
|
|
104
104
|
*/
|
|
105
105
|
fun setupBackground() {
|
|
106
|
-
val outerRadii =
|
|
106
|
+
val outerRadii = floatArrayOf(
|
|
107
|
+
cornerRadius,
|
|
108
|
+
cornerRadius,
|
|
109
|
+
cornerRadius,
|
|
110
|
+
cornerRadius,
|
|
111
|
+
0f,
|
|
112
|
+
0f,
|
|
113
|
+
0f,
|
|
114
|
+
0f
|
|
115
|
+
)
|
|
116
|
+
|
|
107
117
|
val background = ShapeDrawable(RoundRectShape(outerRadii, null, null))
|
|
108
118
|
|
|
109
119
|
// Use current background color
|
|
@@ -45,22 +45,13 @@ class RootSheetView(private val context: Context?) :
|
|
|
45
45
|
private val reactContext: ThemedReactContext
|
|
46
46
|
get() = context as ThemedReactContext
|
|
47
47
|
|
|
48
|
-
private fun updateContainerSize() {
|
|
49
|
-
sizeChangeListener?.let { it(viewWidth, viewHeight) }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
48
|
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
|
53
49
|
super.onSizeChanged(w, h, oldw, oldh)
|
|
54
50
|
|
|
55
51
|
viewWidth = w
|
|
56
52
|
viewHeight = h
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
override fun addView(child: View, index: Int, params: LayoutParams) {
|
|
62
|
-
super.addView(child, index, params)
|
|
63
|
-
updateContainerSize()
|
|
54
|
+
sizeChangeListener?.let { it(viewWidth, viewHeight) }
|
|
64
55
|
}
|
|
65
56
|
|
|
66
57
|
override fun handleException(t: Throwable) {
|
package/package.json
CHANGED