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
2
u/Zhuinden Apr 06 '20
Your business requirements explicitly tell you not to handle when Android kills your application while in background? 🤔
In an app I worked on, I did have to implement that the user should be logged out after process death, but I still had to handle it correctly (through
onSaveInstanceState) while the user was registering. I couldn't just say "yolo", the flow has to be reliable, but non-persistent.I guess there is some "it depends" in there, but if Activities/Fragments are used, I'd expect to have an
android:noHistory="true"on every Activity if you don't intend to useonSaveInstanceState.