<iDenfy> uses Jetpack Compose in our production SD...
# android
v
iDenfy uses Jetpack Compose in our production SDK. We’ve created an article about using Jetpack Compose to make custom UI for clients. Read & spread the adoption! 🚀 https://medium.com/idenfy/fully-customizable-jetpack-compose-8c8abaf93137
🙌 1
p
very cool! I hope you don't mind me hijacking your thread to ask an implementation question, it looks like y'all found a workaround to a problem I was having. I was trying to figure out a way to pass composable functions to a DialogFragment as parceled args so I could could have one reusable dialogfragment that could show any composable view. It looked like this:
Copy code
@Parcelize
class ComposableParcelWrapper(val composable: @Composable ComposableDialog.() -> Unit) : Parcelable
Copy code
class ComposableDialog() : DialogFragment() {
...
fun create(composable: ComposableParcelWrapper) = ComposableDialog().apply {
    arguments = Bundle().apply {
        putParcelable(EXTRA_PARCELABLE, composable)
    }
  }
}
but I was always seeing
Copy code
androidx.compose.runtime.internal.ComposableLambdaImpl cannot be cast to <http://java.io|java.io>. "Serializable"
errors when Android tried to restore the fragment args. Did you find a workaround for that?
v
Hello, we haven’t solved it 😅 We create everything in Application class, parcelize does not work for now 😞