RefreshControl IndexOutOfBoundsException: getChildDrawingOrder() crash #2329
Labels
Platform: Android
This issue is specific to Android
Repro provided
A reproduction with a snack or repo is provided
Description
In Screen.kt we have this check
if (child.javaClass.simpleName.equals("CircleImageView")) {
However, when we minify our code the class name is obfuscated and this check never returns true and we run into the same IndexOutOfBoundsException this check and corresponding code was added to avoid (link)
CircleImageView is a private class within
androidx.swiperefreshlayout.widget
therefore we cannot do a direct class comparison. A work around is to stop minification of this class by adding the following to pro guard rules-keepnames class androidx.swiperefreshlayout.widget.CircleImageView
This is obviously a hacky workaround, and we should instead change the check. CircleImageView extends ImageView therefore we can add a safe, minification safe check to resolve the original issue, and this bug.
if (parent is SwipeRefreshLayout && child is ImageView) {
Steps to reproduce
Snack or a link to a repository
https://github.com/BenIrving/refreshcontrolrepro/tree/main
Screens version
3.24.0
React Native version
0.74.5
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: