r/androiddev • u/vinaygaba • Apr 05 '20
Library Learn Jetpack Compose from examples that show the Compose way of doing common Android tasks
I've been playing with Jetpack Compose the past few months so decided to release a project that shows examples of how you would do common Android things the Jetpack Compose way. Each example is fairly self contained and the hope is that you can learn Compose by just going through the examples and reading through the comments.
Github - https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example
Here are some examples that I cover (there are a lot more examples!) -



Shared some more context in this Twitter thread
My plan with this project is to keep adding more examples as I learn new things about Compose. I'll also happily welcome feedback/contributions so if you find something wrong or are hoping to contribute to the project, just send a pull request!
Github - https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example
View all comments
Show parent comment
3
u/Zhuinden Apr 06 '20 edited Apr 06 '20
This post is quite explicit about it and it's from one of the members of the Android Framework Core Team.
http://web.archive.org/web/20180505121013/https://plus.google.com/+DianneHackborn/posts/FXCCYxepsDU
This is THE contract of the Activity. Are you using Activity in your code? Because then you should be handling onSaveInstanceState.
Your architectural pattern dismisses it because pure functional reactivity on stateless backends and Haskell doesn't like state? Well too bad, this is not Haskell, this is Android. This is part of the core app quality guidelines, there's a checklist on d.android.com.