Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 4.32 KB

File metadata and controls

111 lines (75 loc) · 4.32 KB

📝 Note App - MVVM Architecture

This is a simple Note Taking App built as part of the Android Class 4th Assignment at IDET Institute. The app follows the MVVM (Model-View-ViewModel) architectural pattern and demonstrates the use of LiveData, RecyclerView, and Fragment for a clean and modern Android development approach.

📌 Features

  • ✅ Add a new note
  • ✅ View note details
  • ✅ Edit existing notes
  • ✅ Display list of notes using RecyclerView
  • ✅ Automatically updates UI using LiveData and MutableLiveData
  • ✅ All notes are managed within a Fragment using MVVM architecture

🧠 Architecture - MVVM

  • Model: Represents the Note data class
  • View: UI components including Fragments and XML layouts
  • ViewModel: Handles data logic and exposes LiveData for the View to observe

🛠️ Tech Stack

  • Kotlin
  • Android Jetpack Components
    • LiveData
    • ViewModel
    • Fragment
    • RecyclerView
  • MVVM Architecture

📂 Project Structure

Note-App/
├── app/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/com/cusaldev/noteapp/
│   │   │   │   ├── ui/        # Fragments and UI logic 
│   │   │   │   │                (NoteFormFragment, NoteListFragment)
│   │   │   │   ├── adapters/  # RecyclerView Adapter (NoteAdapter)
│   │   │   │   ├── model/     # Note data model
│   │   │   │   ├── viewmodel/ # NoteViewModel
│   │   │   │   └── MainActivity.kt
│   │   │   └── res/
│   │   │       ├── drawable/ 
│   │   │       ├── layout/ 
│   │   │       ├── mipmap/ 
│   │   │       ├── navigation/ 
│   │   │       ├── values/ 
│   │   │       └── xml/
│   └── build.gradle
└── build.gradle

🚀 How It Works

  • Notes are displayed in a RecyclerView inside a Fragment.
  • When a new note is added or an existing one is updated, the ViewModel updates the note list using MutableLiveData.
  • The RecyclerView automatically refreshes its content by observing the LiveData from the ViewModel.

📷 UI Screenshots

📜 Commit History

1. Initializes Note App project and create a data model. 34a623d

2. Implements NoteViewModel with basic CRUD operations. d342f11

3. Adds Navigation, ViewBinding, and related dependencies. ceba0c4

4. Implements Note serialization and item layout. 5535694

5. Implements NoteAdapter to display notes in a RecyclerView. 385fdee

6. Implements note list and form fragments with navigation. 2a86dba

7. Adds navigation graph for NoteListFragment and NoteFormFragment. 850e6b3

8. Implements navigation between note list and form. 3f88f89

9. Connects MainActivity to navigation graph. a3a1153

10. Adds launcher icon background color resource. 8d5938c

🔗 Repository

GitHub Repo: https://github.com/cusaldmsr/Note-App

👨‍🎓 Author

GitHub: @cusaldmsr


Feel free to contribute or fork the project for your own learning!