Skip to content

Instantly share code, notes, and snippets.

@oliverspryn
Last active March 11, 2024 12:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oliverspryn/7aa0581af45caf512580607c97f66c93 to your computer and use it in GitHub Desktop.
Save oliverspryn/7aa0581af45caf512580607c97f66c93 to your computer and use it in GitHub Desktop.
A prompt for ChatGPT used to build ToDo GPT for Android using Jetpack Compose
I am going to build an native Android app using Kotlin and Jetpack Compose. I already have a new project created in Android Studio but would like your help for the rest. I don't have any screens, just an empty activity with a setContext() function inside of it, ready for Jetpack Compose to take over. My next prompt will explain what the app is for and what I want it to do.
This app should be a todo list app. It should have the following features:
- One screen with a list of all of your tasks.
- That screen should have an empty state saying "No Tasks" when there aren't any tasks stored in the app.
- The screen should have a FAB that allows you to add a new task to that list.
- Pressing that FAB should open a pop-up dialog with a text field, allowing you to enter the name of the task to complete. It should also have an OK button that adds the task to the list on the screen and a Cancel button that closes the dialog without saving the task.
- Each task in the list should have a checkbox. That task can be completed by checking the associated checkbox. A task can be uncompleted by unchecking the associated checkbox.
- Long-pressing on a task should bring up another dialog asking if the user wants to delete that task. It should also have an OK button that deletes the relevant task from the list and a Cancel button that closes the dialog without changing the list.
- The tasks should be saved in a Room database
You stopped at step 6 where I am updating the MainActivity. Can you continue from there?
Can you continue step 9, you stopped part way
For the scaffold the content parameter is not being used. That is an error. Can you fix it?
The TopAppBar doesn't have a backgroundColor parameter. What should I use instead?
I don 't have a MaterialTheme.colors property. What should I use instead?
@Ravinnpawar
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment