Introduction to Android Development
Introduction to Android Development
Android
Development
Building Your First Android App
by Joseph Tesfaye
Why Android
Development?
Critical Juncture Optimize
Mobile apps are essential.
Operations
Reach a wider audience.
Future-Proof Business
Stay competitive with mobile presence.
What is an Activity?
Single Screen User Interaction Examples
An Activity is one screen in an app. Handles all user interactions. Login or profile page.
Activity Lifecycle
onCreate() 1
Initializes Activity, loads layout.
2 onStart()
Activity visible, not interactive.
onResume() 3
Activity fully interactive.
4 onPause()
Partially obscured, save data.
onStop() 5
Activity hidden, save critical data.
6 onDestroy()
Activity destroyed.
onRestart() 7
Activity restarts after stop.
Working with Views
UI Elements XML Layouts
Views are UI components Defined in XML or Java code.
like buttons.
Common Views
TextView, EditText, Button.
Navigating with Intents
Intents
Messages for navigation or actions.
Explicit Intents
Navigate to specific Activity.
Implicit Intents
Trigger general actions.
Passing Data
Use putExtra() to send data.
Hands-On: Building a Profile App
Handle Lifecycle
Write Java Code
Save/restore data in
Create Layouts
For navigation and data passing. onPause()/onCreate().
MainActivity (form) and
DisplayActivity (display).
Key Takeaways
Lifecycle
Manages Activity
states.