当前位置:网站首页>COMP5216 Mobile Computing Assignment 1 - Extending ToDoList app

COMP5216 Mobile Computing Assignment 1 - Extending ToDoList app

2022-06-26 16:49:00 JKooll

Assignment 1 – Extending ToDoList app

Total: 5 marks

Due date: submit all project files as one zipped file by 7pm Week 05 and demo in Week 05 lab

In this assignment, you need to design and extend a ToDoList app which contains at least two views.

  1. The Main view should contain [0.5 mark]:
  • A ListView which displays all the saved ToDoItems, each ToDoItem consists of ToDoItem title and the creation / last edited datetime. Clicking a ToDoItem will switch to the “Edit/Add Item” view.
  • An “ADD NEW” button. Once this button is clicked, the app will switch to the “Edit/Add Item” view.
  1. The “Edit/Add Item” view should contain [1 mark]:
  • A Text field which allows user to type or edit the title of a ToDoItem to add or update the ListView.
  • A “Save” button used for adding new, or updating the title and datetime of ToDoItem in the ListView:
    • If updating an existing item, display both the item and creation/last edited datetime of the ToDoItem. Upon saving, update the item and datetime with the current system datetime.
    • If adding a new item, capture both the item and creation datetime of the ToDoItem. The creation datetime is the current system datetime.
  • A “Cancel” button next to the “Save” button, used to close the Activity without updating the ToDoItem. When this button is clicked, the app will pop up a dialog that asks user: ”Are you sure to cancel this edit? Your unsaved edit will be discarded if you click YES”.

Hint: You should customise the ListView and the adapter. Read the following tutorial, and replace the current ArrayAdapter with your own defined Adapter class. Also replace the list item layout “android.R.layout.simple_list_item_1” with your own layout.

https://github.com/codepath/android_guides/wiki/Using-an-ArrayAdapter-with-ListView

Your app should also be able to handle the following data persistence tasks [1.5 marks]:

  • Every time user launches this app, the app loads the ToDoList from the local Database.
  • The ToDoList should be sorted and displayed based on the most recent created/last edited datetime i.e. the most recent ToDoItem is shown on top of the list
  • When clicking the “Save” button in the “Edit/Add Item” view, the app should add or update the ToDoItem in both the ListView and local Database.
  • Add a long click event to delete a ToDoItem from the ListView. When user tries to delete the selected ToDoItem, the app will pop up a message that asks user: ”Do you want to delete this item?” If the user clicks “YES”, this ToDoItem will be deleted from both the ListView and local Database.
  1. App should be able to be built and run successfully on emulator [0.5 mark]
  2. Coding [1.5 marks]:

[0.5 mark] Documentation: use proper in-line code commenting, and Javadoc comments for new public classes, methods, variables and constants.

Resources download link :https://download.csdn.net/download/jkol12/21722425

原网站

版权声明
本文为[JKooll]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170506271053.html