Android Development Study Guide
1. What is Android?
- Open-source mobile OS developed by Google.
- Based on Linux kernel; supports Java/Kotlin.
- Uses APK files to install apps.
- Android SDK (Software Development Kit) helps in building apps.
2. Obtaining the Required Tools
- Android Studio: Official IDE by Google.
- Java/Kotlin SDK: Required to write code.
- AVD Manager: Creates virtual devices to test apps.
- Gradle: Build system for compiling Android apps.
3. Creating Your First Android App
- Open Android Studio -> Start new project -> Choose Empty Activity.
- Name your app, select language (Java/Kotlin).
- Understand [Link] / [Link] and activity_main.xml.
- Use Logcat to view logs.
- Run app on emulator or physical device.
4. Understanding the Components of Screen
- Activity: Represents a single screen.
- Layout: XML file that defines UI elements.
- View: UI components like TextView, Button, etc.
- ViewGroup: Containers like LinearLayout, ConstraintLayout.
5. Adapting Display Orientation
- Use onConfigurationChanged() or android:configChanges in manifest.
- Handle screen rotation by saving state with onSaveInstanceState().