Android Development 📱

Build Mobile Apps using Kotlin / Java

1. What is Android?

Android is a mobile operating system by Google used to build smartphone applications.

2. Tools Needed

- Android Studio
- Kotlin / Java
- Emulator or Real Device

3. Project Structure

app/
 ├── java/
 │    └── MainActivity.kt
 ├── res/
 │    ├── layout/
 │    └── values/
 ├── AndroidManifest.xml

4. Main Activity (Kotlin)

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }
}

5. UI Design (XML)

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello Android"
    android:textSize="20sp" />

6. Button Click

button.setOnClickListener {
    textView.text = "Button Clicked"
}

7. Intent (Screen Change)

val intent = Intent(this, SecondActivity::class.java)
startActivity(intent)

8. Layout Types

- Linear Layout
- Constraint Layout
- Relative Layout

9. Storage

- SQLite
- Firebase
- Shared Preferences

10. API Integration

Retrofit library:
- Connect backend
- Fetch JSON data

11. Mini Project Ideas