acorn
acorn copied to clipboard
Abstraction of AcornActivities to handle Jetpack Compose
Is your feature request related to a problem? Please describe. I am trying to make use of Acorn for Navigation in a fully Jetpack Compose screens. This is hard because AcornActivities are coupled with the ViewGroup with the ViewControllerFactory.
Describe the solution you'd like It would be nice to have the whole ViewController abstracted to just a View and not attached to Android's ViewGroup.
Describe alternatives you've considered I did a naive implementation of this but haven't figured out the right abstractions yet. Especially with transitions. https://github.com/gumil/talan/tree/master/app/src/main/java/dev/gumil/talan/acorn
I've played around with this as well, and ditched the entire AcornAppCompatActivity
and implemented the view mechanism manually. I still use ViewControllers, but a modified version that can provide @Composable
views. My activity manually subscribes to Scene changes and updates a Composable state.
Transitions are a difficult one overall in Compose, so I guess we'll have to wait with what the teams come up.