Closed gabrielmaldi closed 2 months ago
I solved it this way!
private fun getInitialWindowMetrics(): Map<String, Any> { val decorView = reactApplicationContext.currentActivity?.window?.decorView as ViewGroup? val contentView = decorView?.findViewById(android.R.id.content) ?: return emptyMap() val insets = getSafeAreaInsets(decorView) val frame = getFrame(decorView, contentView) return mapOf( "insets" to (insets?.let { edgeInsetsToJavaMap(it) } ?: emptyMap()), "frame" to (frame?.let { rectToJavaMap(it) } ?: emptyMap()) ) }
I did one patch. If anyone need. react-native-safe-area-context+4.9.0.patch
@FernandoAOborges @chucongqing @yuhao965472200 did you tried on new architecture?
Updating to "react-native-safe-area-context": "4.10.0-rc.2"
fixed this issue for me (newArchEnabled=false
).
npm i react-native-safe-area-context@4.10.0-rc.2
I installed 4.10.0-rc.2
version and it worked fine
@FernandoAOborges @chucongqing @yuhao965472200 did you tried on new architecture?
"react-native-safe-area-context": "4.10.0-rc.2" works for new arch
"react-native-safe-area-context": "4.10.0-rc.2" library works fine in RN ver.0.74.0
I was waiting for the official release to make 4.10 the lastest version, will try to do that today.