You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug CropImageView.setImageUriAsync leads to android.view.ContextThemeWrapper cannot be cast to androidx.fragment.app.FragmentActivity
when CropImageView is nested inside view that have overrided android:theme atribute
To Reproduce
Steps to reproduce the behavior:
Set image uri on CropImageView with setImageUriAsync
Apply ThemeOverlay by add it to view layout android:theme
See error
Expected behavior
Try to unpack FragmentActivity from ContextThemeWrapper
Thanks for the detailed bug description and the commits.
Indeed we cannot expect that context will have/be a fragmentActivity and was a mistake that I didn't spot before.
Would you like to open a PR for the library with the fix issue? I'm just worry about the while inside getFragmentActivityFrom, maybe we could get block in a loop here forever?
But if you open the PR with the fix and updating the changelog we can merge and release =)
Describe the bug
CropImageView.setImageUriAsync
leads toandroid.view.ContextThemeWrapper cannot be cast to androidx.fragment.app.FragmentActivity
when
CropImageView
is nested inside view that have overridedandroid:theme
atributeTo Reproduce
Steps to reproduce the behavior:
CropImageView
withsetImageUriAsync
ThemeOverlay
by add it to view layoutandroid:theme
Expected behavior
Try to unpack
FragmentActivity
fromContextThemeWrapper
Additional context
See https://github.com/WMariusz/Android-Image-Cropper/tree/bug/theme-overlay-context-wrapper
i have added two commits, first with bug and second with workaround that issue
The text was updated successfully, but these errors were encountered: