Skip to content

Latest commit

 

History

History
108 lines (85 loc) · 3.87 KB

File metadata and controls

108 lines (85 loc) · 3.87 KB

Todo List Android App

A modern, feature-rich Android todo list application built with Kotlin, Material Design 3, and Room database.

Features

  • Add, Edit, and Delete Tasks: Full CRUD operations for managing tasks
  • Mark Tasks as Complete/Incomplete: Toggle task completion status
  • Filter Tasks: View All, Active, or Completed tasks
  • Task Statistics: Real-time count of total and completed tasks
  • Clear Completed Tasks: Bulk delete all completed tasks
  • Modern UI: Beautiful Material Design 3 interface with gradients
  • Local Database: Persistent storage using Room database
  • MVVM Architecture: Clean architecture with ViewModel and LiveData
  • Responsive Design: Works on all screen sizes

Project Structure

app/
├── src/main/
│   ├── java/com/example/todolist/
│   │   ├── MainActivity.kt              # Main UI controller
│   │   ├── Task.kt                      # Data class for tasks
│   │   ├── TaskAdapter.kt               # RecyclerView adapter
│   │   ├── TaskDao.kt                   # Database access interface
│   │   ├── TaskDatabase.kt              # Room database configuration
│   │   ├── TaskRepository.kt            # Data repository
│   │   └── TaskViewModel.kt             # ViewModel for UI logic
│   ├── res/
│   │   ├── drawable/                    # Icons and drawables
│   │   ├── layout/                      # UI layouts
│   │   ├── values/                      # Colors, strings, themes
│   │   └── xml/                         # Backup and data rules
│   └── AndroidManifest.xml              # App configuration
├── build.gradle                         # App-level dependencies
└── proguard-rules.pro                   # Code obfuscation rules

Architecture

This app follows the MVVM (Model-View-ViewModel) architecture pattern:

  • Model: Task data class and TaskDao for database operations
  • View: MainActivity and layout files
  • ViewModel: TaskViewModel for business logic and data management
  • Repository: TaskRepository as a single source of truth for data

Technologies Used

  • Kotlin: Primary programming language
  • Room Database: Local data persistence
  • LiveData: Reactive data streams
  • ViewModel: UI state management
  • RecyclerView: Efficient list display
  • Material Design 3: Modern UI components
  • View Binding: Type-safe view access
  • Coroutines: Asynchronous programming

Getting Started

  1. Open in Android Studio: Import the project into Android Studio
  2. Sync Gradle: Let Android Studio sync the project dependencies
  3. Build and Run: Build the project and run it on an emulator or device

Requirements

  • Android Studio Arctic Fox or later
  • Minimum SDK: API 24 (Android 7.0)
  • Target SDK: API 34 (Android 14)

Database Schema

The app uses Room database with the following structure:

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    text TEXT NOT NULL,
    completed INTEGER NOT NULL DEFAULT 0,
    createdAt TEXT NOT NULL,
    updatedAt TEXT
);

UI Features

  • Gradient Backgrounds: Beautiful gradient backgrounds for visual appeal
  • Card-based Layout: Material Design cards for organized content
  • Custom Checkboxes: Styled checkboxes with custom states
  • Responsive Design: Adapts to different screen sizes
  • Empty State: Friendly message when no tasks exist
  • Smooth Animations: Subtle animations for better UX

Future Enhancements

  • Task categories/tags
  • Due dates and reminders
  • Task priority levels
  • Dark theme support
  • Cloud sync
  • Task sharing
  • Search functionality
  • Task statistics and analytics

License

This project is open source and available under the MIT License.