This is a simple list mobile app (to-do list, tasks, shopping list, recipes, and the like) showcasing the implementation of CRUD operations with various Android technologies and patterns, including:
- Single-activity architecture with Navigation component
- MVVM pattern with
ViewModel
andLiveData
- Jetpack Compose
- Migrated from View-based UI, using
ComposeView
- State hoisting with
MutableState
andViewModel
- Access
ViewModel
from composable using theviewModel()
function - Composable preview
- Side-effect API
- Migrated from View-based UI, using
- View Binding
- Room persistence library
- Repository pattern
- Singleton pattern for database and repository
- Coroutines
- Display a list of items (
RecyclerView
,LiveData
) - Navigate to a page to add or edit items
(Navigation component, Safe Args,
TextField
withFocusRequester
andTextFieldValue
) - Swipe to delete items (
ItemTouchHelper
) - Store items in database (Room, coroutines)
- Database migration
This project also implements a widget that can be added to the Home screen, with the following features:
- Display a list of items from the app's database
(
ListView
,RemoteViewsService
,RemoteViewsFactory
, Room) - Tap widget title bar to launch the app (
PendingIntent.getActivity()
) - Tap the Add button to launch the app's New Item screen
(
NavDeepLinkBuilder
) - Tap a list item to launch the app's Edit Item screen
(
PendingIntent
template, fill-inIntent
,NavDeepLinkBuilder
with arguments) - Widget will be updated when list items are modified from the app
(Broadcast using the
ACTION_APPWIDGET_UPDATE
Intent
)
- Android Studio Bumblebee | 2021.1.1 Patch 2 or newer
- Android 5.0 (API level 21) or higher
- Kotlin 1.6 or higher