Software Engineering - Introduction + Process Models + Requirements Engineering
Android study jams session 3
1. This work is licensed under the Apache 2.0 License
Android Study Jams
Session 3 - 3rd Jan 2022
Rishi Balamurugan, Facilitator
Pranshu Aggarwal, Mentor
GDSC Shiv Nadar University
2. This work is licensed under the Apache 2.0 License
Session Outline:
● Session 2 recap
● Unit 3 concepts
○ Intents
○ Activity Lifecycle
○ Jetpack Navigation
○ ViewModel
● Code Review
○ Words app
○ Unscramble app
● Q & A
3. This work is licensed under the Apache 2.0 License
Session 2 recap:
● Basic concepts overview
○ Layouts
○ XML
○ Gradle
● Code Review
○ Tiptime app
○ Affirmations app
4. This work is licensed under the Apache 2.0 License
● It’s object representing some action to be
performed
● Two types: Implicit and Explicit
Intent
5. This work is licensed under the Apache 2.0 License
Activity Lifecycle:
6. This work is licensed under the Apache 2.0 License
Jetpack Navigation:
● Simplifies Android Navigation
● Components:
○ NavHostFragment
○ NavController
○ Navigation Graph
7. This work is licensed under the Apache 2.0 License
Code Review: Words app
8. This work is licensed under the Apache 2.0 License
● Model of the app data that is displayed on the
screen
● Isn’t destroyed when an activity is destroyed
ViewModel:
● Observable data holder class
● Is lifecycle-aware
Livedata:
9. This work is licensed under the Apache 2.0 License
Code Review: Unscramble app
10. This work is licensed under the Apache 2.0 License
THANK YOU
and have fun helping your communities
become Android developers!
Editor's Notes
How are you doing today? Give thumbs up or say in chat
Q&A at end, feel free to put questions in the chat
Pranshu will address them
Ppl with coding experience have patience
Ppl without, go thru course and recording
Most commonly used to launch activity, but that’s not the only use.
Explicit: Highly specific, used to launch activity in app
Implicit: Used to tell the system to handle certain actions
System is responsible for figuring out how to handle it
onSavedInstanceState
Simplifies and has a lot of related features to make things easier
Single activity with changing fragments has 3 components
Fragment: Reusable portion of UI which has own lifecycle, layout and events
Nav controller: used to perform action
Nav graph: XML file type to visualize nav (destinations, actions with safe args)
Safe args: Generates classes from graph for access to args for destination and actions
Separation of concerns: diff class with diff responsibility
Viewmodel helps, holds data
Data not in activity, coz it can be destroyed