A fully-featured TODO application for Android with local data persistence using SQLite and SharedPreferences.
-
Todo Management
- ✅ Create new todos
- ✅ Mark todos as completed
- ✅ Edit existing todos
- ✅ Delete todos
-
Categories
- ✅ Create categories (default: "Work", "Private", "Shopping", "Health", "Other")
- ✅ Assign todos to categories
- ✅ Display and manage categories
- ✅ Edit and delete categories
-
App Settings
- ✅ Dark/Light theme toggle (UI implemented, theme switching not applied)
- ✅ Notifications on/off toggle (UI implemented, no actual notifications)
- ✅ Language selection DE/EN (UI implemented, no actual translations)
-
Data Storage
- ✅ All todos and categories stored in SQLite database
- ✅ App settings stored with SharedPreferences
- ✅ Data persists after app restart
- ✅ Foreign key relationship between todos and categories
-
Search Function
- ✅ Search todos by title
- ✅ Filter by categories (via category management)
- ✅ Filter by completed/open tasks
-
Statistics
- ✅ Display count of open/completed todos
- ✅ Show completion rate percentage
- ✅ Display todos per category
-
Export/Import
- ✅ Export data as JSON file
- ✅ Import JSON backup
- Package Structure:
activities/- All activity classesadapters/- RecyclerView adaptersdatabase/- SQLite database helpermodels/- Data model classesutils/- Utility classes (PreferencesManager, JsonHelper)
Categories Table:
- id (INTEGER PRIMARY KEY AUTOINCREMENT)
- name (TEXT NOT NULL)
- color (TEXT)
Todos Table:
- id (INTEGER PRIMARY KEY AUTOINCREMENT)
- title (TEXT NOT NULL)
- description (TEXT)
- is_completed (INTEGER DEFAULT 0)
- category_id (INTEGER, FOREIGN KEY)
- created_date (TEXT)
-
DatabaseHelper.java - Singleton class handling all database operations with proper error handling and logging
-
PreferencesManager.java - Singleton class managing SharedPreferences for app settings
-
MainActivity.java - Main screen with RecyclerView, search, and filter functionality
-
AddEditTodoActivity.java - Form for creating and editing todos with input validation
-
ManageCategoriesActivity.java - CRUD operations for categories
-
SettingsActivity.java - User preferences management
-
StatisticsActivity.java - Data visualization and statistics
-
JsonHelper.java - JSON export/import functionality
- AndroidX AppCompat
- Material Design Components
- RecyclerView
- CardView
- Gson (for JSON serialization)
- ConstraintLayout
- ✅ Clean separation between UI and data logic
- ✅ Error handling for database operations with try-catch blocks
- ✅ Input validation for all form fields
- ✅ Comprehensive code comments explaining functionality
- ✅ Singleton pattern for database and preferences managers
- ✅ ViewHolder pattern for efficient RecyclerView scrolling
- Open the project in Android Studio
- Sync Gradle files
- Run on an emulator or physical device (minimum SDK 24 - Android 7.0)
- The app will create default categories on first launch
- Create new todos and verify they persist after app restart
- Mark todos as completed and verify state is saved
- Edit todos and verify changes are persisted
- Delete todos and verify they are removed from database
- Create, edit, and delete categories
- Search todos by title
- Filter todos by status (All/Open/Completed)
- View statistics
- Toggle settings and verify they are saved
- Export data to JSON
- Import data from JSON backup
- Test on different screen sizes and orientations
- Theme switching UI is implemented but does not actually change the app theme
- Notification toggle is implemented but app does not send notifications
- Language selection is implemented but no actual translations are provided
- These are intentional as per assignment requirements
Created for Android Development Course - Local Storage Assignment