This is a simple Android Notes application developed in Kotlin using Fragments and a BottomNavigationView for navigation. It allows users to:
- View a list of notes
- Create and edit notes
- Delete and share notes
- Toggle between light and dark mode
com.example.notes
├── MainActivity.kt
├── data
│ ├── Note.kt
│ └── NoteData.kt
├── fragments
│ ├── NotesListFragment.kt
│ ├── NoteDetailFragment.kt
│ └── SettingsFragment.kt
├── res
│ ├── layout/
│ ├── values/
│ ├── menu/
│ └── drawable/
- Displays a list of saved notes.
- Tapping a note opens it in
NoteDetailFragmentfor editing.
- Used for viewing, creating, editing, deleting, and sharing notes.
- Dynamically receives a note index via
newInstance(index: Int)or opens in “new note” mode.
- Contains a toggle switch to change between Light and Dark themes.
- Uses
SharedPreferencesto persist user preference.
Handles loading notes from a bundled notes.json file in the assets folder.
fun loadNotes(context: Context)- Notes are loaded only once at startup.
- Currently, no persistent save (notes are lost after app restart).
Located in activity_main.xml, this allows switching between fragments.
Notes: Shows all notesNew: Opens a blankNoteDetailFragmentSettings: Opens settings
- Icon and text tint are styled via
ColorStateListfiles. - Night mode support added using
values-night/colors.xml.
- Uses
AppCompatDelegateto switch themes. - Custom themes defined in
styles.xml(Light) andstyles-night.xml(Dark).
- Notes are not saved persistently (no file/db saving after editing).
- No filtering or search on the notes list.
- Theme toggle does not dynamically update all UI elements (only after restart).
- Implement persistent save using:
SharedPreferencesRoomDatabase- Writing back to a JSON file
- Add filtering/search in
NotesListFragment - Improve UI with custom icons and animations