@ionic/portals-react-native 0.0.5 → 0.0.6
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.
|
@@ -241,23 +241,22 @@ internal class PortalViewManager(private val context: ReactApplicationContext) :
|
|
|
241
241
|
fragmentMap.remove(view.id)
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
private fun setupLayout(view:
|
|
245
|
-
Choreographer.getInstance().postFrameCallback {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
private fun setupLayout(view: View) {
|
|
245
|
+
Choreographer.getInstance().postFrameCallback(object : Choreographer.FrameCallback {
|
|
246
|
+
override fun doFrame(frameTimeNanos: Long) {
|
|
247
|
+
layoutPortal(view)
|
|
248
|
+
view.viewTreeObserver.dispatchOnGlobalLayout()
|
|
249
|
+
Choreographer.getInstance().postFrameCallback(this)
|
|
250
|
+
}
|
|
251
|
+
})
|
|
249
252
|
}
|
|
250
253
|
|
|
251
|
-
private fun
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
private fun layoutPortal(view: View) {
|
|
255
|
+
view.measure(
|
|
256
|
+
View.MeasureSpec.makeMeasureSpec(view.measuredWidth, View.MeasureSpec.EXACTLY),
|
|
257
|
+
View.MeasureSpec.makeMeasureSpec(view.measuredHeight, View.MeasureSpec.EXACTLY)
|
|
258
|
+
)
|
|
254
259
|
|
|
255
|
-
|
|
256
|
-
View.MeasureSpec.makeMeasureSpec(view.measuredWidth, View.MeasureSpec.EXACTLY),
|
|
257
|
-
View.MeasureSpec.makeMeasureSpec(view.measuredHeight, View.MeasureSpec.EXACTLY)
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
child.layout(0, 0, child.measuredWidth, child.measuredHeight)
|
|
261
|
-
}
|
|
260
|
+
view.layout(0, 0, view.measuredWidth, view.measuredHeight)
|
|
262
261
|
}
|
|
263
262
|
}
|