Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstraction of AcornActivities to handle Jetpack Compose #169

Open
gumil opened this issue Aug 27, 2020 · 1 comment
Open

Abstraction of AcornActivities to handle Jetpack Compose #169

gumil opened this issue Aug 27, 2020 · 1 comment

Comments

@gumil
Copy link

gumil commented Aug 27, 2020

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

@nhaarman
Copy link
Owner

nhaarman commented Mar 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants