Starting from:

$30

ITCS5180-Homework 4 Movie Database Solved

In this assignment you will get familiar with Android Intents, Data passing between Intents (Parcelable/Simple Data Passing) and Starting activity for result. This is a simple movie database app, where you can save your favorite movie details. You can add new movies, edit them, display them by their release year or rating and delete them. The

My Favorite Movies

Figure 1: Main Activity

main screen should look like the Figure 1. 

Main Activity

The main activity contains five buttons arranged as displayed in Figure 1. The main activity should maintain a list of current Movie objects, the list should be shared with the other activities through intent when needed. The activity requirements are as follows:

1.       The Movie list should be stored in the Main Activity. You should use an ArrayList to store the list of Movie Objects. The list should be passed using intent extras to other activities when needed. Do not declare the list as static.

2.      The buttons labeled as Add Movie, Edit, Delete Movie, Show List by Year and Show List by Rating should start the Add Movie Activity, Edit Activity, Delete Movie Activity, Display List Year Activity and Display List Rating Activity respectively.

Add Movie Activity (

The Add Movie activity is displayed in Figure 2. Implement the following requirements:

1.       When you click the “Add Movie” button in the Main Activity, the Add Movie should be started as shown in Figure 2. 

2.      The Movie name must not exceed 50 characters. 

3.      There should be a multiline EditText for the small description. It should not exceed 1000 characters.

 

Add Movie

 

                                                    (a) Empty form of Add Movie       (b) Filled up form of Add

                                                                         activity                                Movie activity

Figure 2: Add Movie activity

4.      There should be a drop down box for selecting the Genre of the Movie. The Genres you should put here are: Action, Animation, Comedy, Documentary, Family, Horror, Crime and Others. 

5.      You should implement a SeekBar for getting the Rating. The minimum value for SeekBar is 0, and the maximum should be set to 5. The step value should be set to 1. 

6.      There should be an EditText to take input for the Year of Release. 

7.      There should be another EditText to take input for the IMDB link.

8.      There should be a button labeled as, “Add Movie”.

9.      Clicking on the “Add Movie” button should save the fields as a Movie object, send it back as a result to the Main Activity so that it can be stored in the Movie List and finish the Add Movie activity.   

10.   You should detect any anomaly and make Toasts accordingly. You should ensure every input here is put accordingly.

Edit Movie Activity  
The Edit Movie activity is displayed in Figure 3. Implement the following:

1.       When you click the “Edit” button on the Main Activity, you should start an Alert Dialogue having a list of all the movies you saved, as it is in Figure 3(b).

2.      Clicking on any of the movies should start the Edit Movie activity to edit that entry. 

3.      The UI for Edit Movie activity is similar to the Add Movie Activity and should follow the same text size and implementation and restrictions. 

4.      It should load the saved fields of the selected movie from the saved Movie List.

My Favorite Movies
 
My Favorite Movies
 
Edit Movie



(a) Click on Edit button            (b) Open the Alert Dialogue       (c) Edit the movie details

Figure 3: Edit Movie activity.

My Favorite Movies
 
My Favorite Movies


(a) Click on Delete Movie    (b) Alert Dialogue with the list, button           click on a movie

Figure 4: Delete Movie

5. Clicking on the Save Changes button should save the fields as a Movie object and send it back to the main Activity so that the list can be updated. 

Delete Movie
The Delete Movie process is displayed in Figure 4. Implement the following requirements:

1.       When the user selects “Delete Movie” button in the Main Activity, just like the Edit Movie part, an Alert Dialogue should come up with the movie list.

2.      When you select one of the movies in the list, it should delete it from the Movie list.

3.      Toast a message showing that the movie is deleted that includes the movie name. 

Show List by Year/Rating  
The final activities you will be creating are Movie by Year activity and Movie by Rating activity. The requirements are as follows:

1.       You must use Implicit intents to implement these activities.

2.      If you click on Show List by Year button you should start the Movies by Year activity. 



                                               (a) Movies by Year Activity            (b) Movies by Rating Activity

Figure 5: Show List by Year/Rating

Button
Action

Show First Movie

Show Previous Movie

Show Next Movie

Show Last Movie
Table 1, GUI Actions

3.      In the activity you should display the string “Movies by Year” on the Top.

4.      You will be sorting the movie list by the Ascending order of Year. The actions required from each of the GUI images are listed in Table 1. Upon clicking on Finish button the activity should be finished.

5.      The Movie by Rating will actually have the same functionalities as the Movie by Year activity. The only difference is that, you need to sort the List by the Descending order of Rating.

More products