๐ŸŽ™ Free live masterclass ยท Sun, 29 Nov, 7:00 pm IST ยท Java Full Stack roadmap Register free โ†’
Skills101

Notes app for Android (Kotlin, Room)

A clean notes app with a local database, search and colours, built with today's Android tools.

Beginnerโฑ 10โ€“14 hours๐Ÿชœ 7 stepsKotlinJetpack ComposeRoom

What you'll learn

  • โ—†Jetpack Compose UI
  • โ—†Room database and DAOs
  • โ—†ViewModel and StateFlow (MVVM)

What you'll build

  • โœ“Create, edit, delete notes
  • โœ“Search
  • โœ“Note colours and pinning
  • โœ“Works offline

Step-by-step guide

  1. 1

    New project

    Android Studio โ†’ Empty Activity (Compose). Add Room dependencies with KSP.

  2. 2

    Entity and DAO

    @Entity data class Note(@PrimaryKey(autoGenerate = true) val id: Int = 0, val title: String, val body: String, val color: Int, val pinned: Boolean, val updatedAt: Long); @Dao with Flow<List<Note>> queries.

  3. 3

    Database

    @Database(entities = [Note::class], version = 1) and a single instance via Room.databaseBuilder.

  4. 4

    ViewModel

    Expose notes as StateFlow from the DAO's Flow with stateIn; functions save() and delete() using viewModelScope.launch.

  5. 5

    List screen

    LazyColumn of note cards; pinned first; a search TextField filtering the list.

  6. 6

    Edit screen

    Navigation Compose route edit/{id}; save when leaving the screen.

  7. 7

    Polish

    Swipe to delete with an Undo Snackbar; dark theme support.

๐Ÿš€ Make it stand out

  • +Reminders with WorkManager notifications
  • +Back up to the cloud
  • +Home-screen widget