Assignment 2 Multi-Note Pad Solution

$35.00

Description

Uses: RecyclerView, Multi-Activity, JSON File, Option-Menus, Async Task

App Requirements

  • This app allows the creation and maintenance of multiple notes. Any number of notes are allowed (including no notes at all). Notes are made up of a Title and Note Text.

  • There is no need to use a different layout for landscape orientation in this application. One layout should work fine in either orientation.

  • Notes should be saved to (and loaded from) the internal file system in JSON format. If no file is found upon loading, the application should start with no existing notes and no errors. (A new JSON file would then be created when new notes are saved).

  • JSON file loading must happen in an AsyncTask that is started in the onCreate method. Saving should happen in the onPause method.

  • A simple java Note class (with last save date, title, and note text) should be created to represent each individual note in the application.

  • The application is made up of 3 activities. These are described below:

1) Main Activity:

  • Notes should be displayed in a list, in time order (latest-update-first, oldest-update-last). The note list must be implemented using the RecyclerView.

  • The Main Activity will allow the user to create a new note via an Add options-menu item . Pressing this button will open the Edit Activity with empty Title and Note Text areas.

  • The main activity will allow the user to edit an existing note by tapping on an existing note in the displayed list of notes. Doing so will open the Edit Activity, displaying the note’s Title and Note Text – both available for editing.

  • The main activity will also have an Info options-menu item that will open the About Activity when pressed. The About Activity (described later) indicates the application’s name, the date & author, and the version number.

  • Notes can be deleted from the Main Activity by long-pressing on a note entry. Upon doing so, a confirmation dialog will be opened where the user can confirm (or cancel) the delete operation.

  • Note list-entries contain the note title (bold), the last-save-time, and the first 80 characters of the note text (see image). Notes titles or note text with more than 80 characters should display “…” after the first 80 characters are displayed.

  • The current number of notes is displayed in the title-bar.

Main Activity (cont.)

  • The activity background should be set to a color other than white (preferable a darker color). The list entries should be a lighter version of that same color.

  • Icons for the Add and Info menu items should be selected from Google’s

Material Design icon set (https://material.io/icons/)

2) Edit Activity

© Christopher Hield

  • The Edit Activity contains editable fields for the note title and note text.

  • The note title is a single-line text field (EditText) where the user can enter or edit a title for the current note.

  • The note text is a multi-line text area (EditText) with no size limit. This should have scrolling capability for when notes exceed the size of the activity.

  • The Edit Activity allows the note title & text to be saved by either:

    1. Pressing the Save options-menu item . This will return the new note to the MainActivity, and then exit the Edit Activity. MainActivity will then add the note to the MainActivity’s list of notes. Note that if no changes have been made to the current note, the Edit Activity simply exits.

    1. Pressing the Back arrow to exit the activity. This will first display a confirmation dialog where the user can opt to save the note (if changes have been made) before exiting the activity. If saved, the new note to the MainActivity, and then exit the Edit Activity. MainActivity will then add the note to the MainActivity’s list of notes. Note that if no changes have been made to the current note, the Edit Activity simply exits.

    • Note this “Save” in steps “a” and “b” does not imply saving to file – it implies updating an existing note object in the Main Activity’s note list or adding a new note to the Main Activity’s note list.

  • A note without a title is not allowed to be saved (even if there is note text). If such an attempt is made simply exit the activity without saving and show a Toast message indicating that the un-titled activity was not saved.

  • The activity background should be set to a color other than white (preferably the same color used in the Main Activity). The title and text fields should be a lighter version of that same color (preferably the same color used in the Main Activity).

  • Icons for the Save menu item should be selected from Google’s Material

Design icon set (https://material.io/icons/)

  • About Activity

  • The About Activity should contain a full-screen image background (use any non-copywritten image you desire).

  • Over the background image, key information on the application should be clearly displayed (clearly readable). This information should include the application title, a copyright date and your name, and the version number (1.0).

  • There is no functionality present on this activity. The only action a user can take is to press the Back arrow to exit the activity.

Application Flow Diagrams (showing how the various behaviors should work)

1) Add a New Note/Edit an Existing Note

Edit Activity

Main

Activity

1a) Tap the

Add button

1b) Tap on

a note to

3a) Tap the

edit

Save button

2) Change

Editable

Fields

4) Select YES

Your note is not saved!

Save note ‘Set DVR’?

NO YES

3b) Tap the

Back button

2) Delete an Existing Note

Main Activity

Delete Note ‘Set DVR’?

NO YES

  1. Long-Press a

Note 2) Selecting YES will

remove the note from

the Main Activity’s

note list (and from the

display).

  1. View the application “about” details

Main Activity About Activity

  1. Tap the Info button

  1. Tap the Back button

to return

Assignment Assistance

The TAs for our course is available to assist you with your assignment if needed. Questions on assignment requirements and course concepts can be sent to the instructor.

Submissions & Grading

  1. Submissions must consist of your zipped project folder (please execute Build =>Clean Project before generating the zip file).

  1. Submissions should reflect the concepts and practices we cover in class, and the requirements specified in this document.

  1. Late submissions will be penalized by 10% per week late. (i.e., from one second late to 1 week late: 10% penalty, from one week plus one second late to 2 weeks late: 20% penalty, etc.).

  • The following are the key points that will be examined in Project when graded:

General (25%)

  1. Loads and Saves Notes to a JSON file – no errors displayed if file is not present.

  1. Load is initiated in the onCreate method, save is performed in the onPause method.

    • Uses ASyncTask for JSON file loading

  1. A separate Note class used to represent note data

    1. App is functional and visible in portrait and landscape orientations

  • MainActivity (37%)

    1. Options Menu is present in App-Bar and is displayed as Icons

  1. Clicking Add button opens the Edit Activity

  1. Clicking Info in the list opens the About Activity, displaying the note’s title and content

  1. Long-click on a note in the list displays Delete Confirmation dialog.

    • Approving dialog results in note deleted from list

    • Cancelling dialog leaves the list unchanged

  1. Activity background color is a color other than white

  1. List uses RecyclerView

  1. Note list is displayed in order of most recent first

  1. List entry contains a bold title, the last-save-time, and note text is limited to 80 chars

    • Adds “…” for titles and notes containing more than 80 chars

  • EditActivity (28%)

  1. Contains editable fields for title (single line) and note text (multi-line)

  1. Options Menu is present in App-Bar and is displayed as Icons

  1. Clicking Save button saves the note, closes the EditActivity, and updates the MainActivity list

  1. Clicking Back button displays Save Confirmation dialog.

    • Approving dialog results in note saved, closes the EditActivity, and updates the MainActivity list

    • Cancelling dialog closes the EditActivity and leaves the list unchanged

  1. Notes with no title are not saved (Toast message informs the user)

    1. Activity background color is a color other than white

  • About Activity (10%)

    1. Contains full-screen background image

  1. Shows application title, copyright data and student name, and Version 1.0

NOTE

This assignment is worth 200 points (your first assignment was worth 100 points).

This means (for example) that if you get 89% on this assignment, your recorded score will be:

(89% * 200 points = 178 points)

Note that this also means that the 10% late submission penalty will be 10% * 200 points = 20 points.