A simple task management Android app built with Jetpack Compose to display a "Task Completed" screen. This app is part of a task management system where users can see a congratulatory message when all tasks are completed. π
- Task Completed Screen: Displays an image and two text messages when all tasks are completed. π
- Jetpack Compose: UI is built using Jetpack Compose, the modern toolkit for building Android UIs. π₯οΈ
- Custom Theming: Uses
Material3
theming to style the app. π¨
To run this project, ensure you have the following:
- Android Studio (latest version recommended) π²
- An Android device or emulator for running the app π₯οΈ
- Kotlin 1.5 or higher π¦ΈββοΈ
- Android SDK installed π οΈ
-
Clone the repository to your local machine:
git clone https://github.com/softwarechoreographer/task-manager-app.git
-
Open the project in Android Studio. ποΈ
-
Sync the project with Gradle files by clicking on "Sync Now" in the top right corner.
-
Ensure your Android emulator is running or connect a physical device. π±
-
Run the app by clicking the Run button (green triangle) in Android Studio.
βΆοΈ
The MainActivity
serves as the entry point for the app. It sets the content view with a TaskManagerAppTheme
and displays the TaskCompletedScreen
.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
TaskManagerAppTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
TaskCompletedScreen()
}
}
}
}
}
The TaskCompletedScreen
is a Composable function that displays a column with an image and two text elements. The text displays a message to congratulate the user for completing all tasks. π
@Composable
fun TaskCompletedScreen() {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Image(
painter = painterResource(R.drawable.ic_task_completed),
contentDescription = null
)
Text(
text = stringResource(R.string.all_task_completed),
modifier = Modifier.padding(top = 24.dp, bottom = 8.dp),
fontWeight = FontWeight.Bold,
fontSize = 24.sp
)
Text(
text = stringResource(R.string.nice_work),
fontSize = 16.sp
)
}
}
This is a preview of the TaskCompletedScreen
to see how it looks during development in Android Studio.
@Preview(showBackground = true)
@Composable
fun TaskCompletedPreview() {
TaskManagerAppTheme {
TaskCompletedScreen()
}
}
ic_task_completed
: This image represents the completion of tasks. It can be found in theres/drawable
directory. π
- Modify the text strings in the
strings.xml
file located underres/values/strings.xml
to change the messages displayed on the screen. π - Replace the
ic_task_completed
image in theres/drawable
folder with your custom image if needed. πΌοΈ
This project is open source and available under the MIT License.