Skip to main content
留学咨询

辅导案例-COMP5216-Assignment 1

By September 14, 2020No Comments

COMP5216 Mobile Computing 2020S2 School of Computer Science Page 1 of 2 Assignment 1 – Extending ToDoList app Total: 5 marks Due date: 7pm 14th September 2020 (Week 04) Submission: 1. Submit all project files as one zipped file. 2. Video of the screen capture demonstrating the actions/features that are required to be developed. 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. 2. 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: o If adding a new item, capture both the item and creation datetime of the ToDoItem. The creation datetime is the current system datetime. o 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. • 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 COMP5216 Mobile Computing Assignment 1 School of Computer Science Page 2 of 2 3. 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. 4. App should be able to be built and run successfully on emulator. [0.5 mark] 5. Coding [1.5 marks]: • [1 mark] Compliant with the official Android Java code style guidelines (https://source.android.com/setup/contribute/code-style), use proper indentation, stick within the 120 char line length, no trailing whitespaces and no unused imports. • [0.5 mark] Documentation: use proper in-line code commenting, and Javadoc standard comments for new public classes, methods, variables and constants.

admin

Author admin

More posts by admin