cause someones passed it to a fragment which is cr...
# android
g
cause someones passed it to a fragment which is crashing when it the activity is being recreated
g
It’s just wrong usage of fragment. There are some ways to do that using serialization, but it’s super hacky and for such simple case just wrong direction. Use DI or any other technique that allows fragment to request dependencies or maybe find some more simple solution and pass some data instead of lambda. Hard to recommend something without real example