This user interface should consist of two screens:

The first screen will be the main screen for the app. It will consist of a scrollable list of "tasks" or "to-do" items with column titles along with an "Add Task" button for adding new "to-do" list items.

Clicking on the "Add Task" button will take the user to a second screen (described below).

The column titles of the list should "float" at the top of the screen, above the list of tasks. When you scroll through the tasks, the button and titles should not scroll, but remain on the screen. You will need to decide what layouts you should utilize to meet these requirements (A ScrollView inside a TableLayout might be a good option for the task list).

Column titles should be named "Task Name", "Task Type" (Personal, Work, etc.), and "Date / Time" (time should be displayed if current day, date displayed if later future date)

An internal list (collection of Task objects?? in memory only) should be utilized to store each task entered on the second screen.

The second screen is for adding new tasks to the list on the main screen. It will consist of one text entry field, a spinner control, and a date picker and time picker, as well as two buttons.

The text entry field will be labeled "Task Name". This field will accept user input of up to 25 characters and can be implemented using the EditText control.

The Spinner will be labeled "Task Type" and should have at least 3 different values. Some examples include "Personal", "Work", "Other". Feel free to come up with your own task types.

The picker controls will allow for user entry of a time and date of each task.

The DatePicker and TimePicker classes should be used.

The two Buttons will be labeled "Add Task" and "Cancel".

The "Add Task" button will take all of the information entered by the user from the text field, spinner and date/time picker controls and send the data to the main screen, and return the user to the main screen where the new task information will be displayed in the list.

The Cancel button will ignore the user's input and simply return the user to the main screen (not displaying any new information).

Some Hints (there are many ways to implement the above, below is just one way):

The LinearLayout class displays its child views horizontally by default. For a vertically oriented LinearLayout you can use the setOrientation() method, passing inLinearLayout.VERTICAL constant.

Add new entries to the ScrollView using the TextView class.

You will need to handle the button press events using the onClickListener() method or the onClick property for that control.

You will need to pass the data from the second screen (Add Task Activity) to the main screen (List Tasks Activity). The correct way to do this is by using Android's Intent class and the putExtra, etc. methods.

Use a string array for the entries in the spinner

Investigate the StretchColumns property of a TableLayout

Review the Android activity lifecycle, you might want to use the onResume() method when switching between activities

You will now need to add persistence to the application so that data can be viewed across multiple user sessions. You are required to use SQLite for the database creation and communication. You will also add a new button to the application that displays only tasks for the current day ("Today's tasks").

The steps you will need to do:

1. Create the database
2. Create the table(s) for the task information.
3. Store the task information in the database when a user adds a new one.
4. Retrieve all of the data from the database and display it on the main screen (by default).
5. Add a new button next to the "Add Task" button on the main screen labeled "Today's Tasks" that will query the database and return/display only tasks that match the current date, when the user selects that button.

Completion of this assignment requires the ability for a user to open the application, add some tasks, close the application, open the application again and see that the tasks are still there, as well as the ability to query/display only tasks that match the current date using the "Today's Tasks" button on the main screen.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.