Programming Project 02: Dynamic List View

Overview

For this homework, you will be building a ListView of Spotify Holiday Songs:

  • The row layout should contain a thumbnail image and text fields.

  • Thumbnail images should be asynchronously downloaded and cashed.

  • Give yourself enough time to read and understand the dataset schema.

  • Example of the JSON object:

[
...
{
    "acousticness":0.82,
    "album_img":"https://i.scdn.co/image/...",
    "album_name":"Merry Christmas",
    "artist_name":"Johnny Mathis",
    "danceability":0.195,
    "duration_ms":213107,
    "energy":0.348,
    "instrumentalness":0.0,
    "key":"A#",
    "key_mode":"A# major",
    "liveness":0.126,
    "loudness":-10.106,
    "mode":"major",
    "playlist_img":"https://mosaic.scdn.co/640/..",
    "playlist_name":"new_holiday_songs","
    speechiness":0.0332,
    "tempo":166.824,
    "time_signature":3,
    "track_name":"Silver Bells",
    "track_uri":"00IqwkT0PZhJ86PJajRCqk",
    "valence":0.262
                        },
  ...
  ]
  • In this homework you will only need the following elements:

    • album_img (String)

    • album_name (String)

    • artist_name (String)

    • danceability (Double)

    • duration_ms (Integer) should be in Minutes and Seconds

    • playlist_img (String)

  • you should design your Java class to deserialize the JSON accordingly.

  • Here is an example of how the layout should look like:

Duration should be displayed in Minutes and Seconds

  • you are ONLY allowed to use two external libraries:

  • you can redesign the layout as you want as long as you are keeping the basic information shown in the image above.

  • in this homework you will need a BaseAdapter your adapter should be called HolidaySongsAdapter

  • you will also need to create a POJO (Plain Old Java Object) class this class should be called HolidaySongs.

  • your main activity should be called MainActivity.

Click Event

  • You need to set a click event to every row, when the user clicks on the raw it should start another activity called ViewSongs this activity should only display the related playlist image - found in the dataset - to the album, for example, if the user clicks on Merry Chrismas album they should see the name of the album and the image of the playlist (playlist might be the same for all albums)

Grading

  • Layout - 40%: Does the application have a listview, adapter, required classes, activities, and layout? is dataset request implemented? Are they aligned well and work on different-sized devices?

  • Logic - 30%: Does the list and the activity work as expected? Does it have all of the necessary functionality?

  • Design - 10%: Did you customize the theme/style? Do the list and the display activity look good?

  • Code Style - 20%: See the style section below

  • Extra Credit:

    • Make your list look better than the example. The customization has to be complicated and more than making small changes like simply changing the default theme colors or changing text size.

    • Add more functionality to your listview (ie sort by a feature, add search functionality, circular image view, feel free to use any external library for any extra features you add to your application)

    • GitHub submission (ex. commit messages are informative, using the correct directory for submission, etc.)

    Extra points will be given based on the difficulty of your extra implementations.

Code Style

You will be graded on

  1. Your code is easy to understand. This includes the naming of file, variable, and method names.

  2. Logic is not duplicated (ie. Don't have separate methods that essentially do the same thing. Think about how you can write less code to accomplish more).

  3. Are you using resource files (ie colors.xml and strings.xml)?

Deliverables

  • Project GitHub link submitted to CANVAS page

  • Readme.txt file for more instructions (use this file to describe your application and all extra features you add to your application)

Last updated

Was this helpful?