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
Added serialization / deserialization ability for AppScreen #144
Conversation
First of all, In case when you have to pass some arguments to new screen you should use function with arguments. So I like consistency and I use functions for all my screens. About 'serializable'. Why do you need it? Basically using serializable interface is bad idea. Nonetheless, if you want it you have to serialize data but not screen instance. Because Screen is factory for fragment (or activity). |
It's, Ok, but in functions first letter must be lower-case.
In my app I have two Activities: MainActivity and CommonActivity. |
Cicerone is not the Compose. And it doesn't use DSL. No, we need to pass serialized Screen and we don't want to implement odd logic with selection of screen by screen args. |
In my opinion, description of screens is simple DSL. Cicerone doesn't force to use upper case for first letter. You can do it as you want 😉 You can use own fork for your cases with serialization of screens. |
Our project is a bit larger, than example 🙂 In our project we can't use single activity in case of different themes and other platform staff, like other processes |
I think You are wrong if you think that Single activity approach is only for small applications. But it is offtop for this topic :) |
Now, |
Hi!
I'm using Cicerone 5.0.0 and in this version serialization worked fine. After update to 6.6.0 I found, that serialization doesn't work. Serialization saw broken by AppScreen and Creator<A, R>.
Also naming of functions in Screens object starts with upper-case letter and lint warns us about it.
I suggest to change functions to val and user UPPER-case naming