Starting from:
$30

$24

Assignment 2 Solution

In this assignment, you are to write an application that allows user to download images from the internet and display them in a scrollable list. On the main activity, you will see 4 buttons:




Downloading an image (​DOWNLOAD​): You will be taken to another screen where you have two EditTexts, one for entering a URL for an image to be downloaded and the other is for the title of the image. You need to store this image along with its title permanently in your database. Your primary key for your table should start from 1 and increases every time you are downloading a new image. Once the download is complete, you should return automatically to the main page. Show an error toast on the screen if there is no internet connectivity.



Delete an image (​DELETE​): You will be taken to another screen where you have the option of providing ID (primary key) or the title of the image you are about to delete. Then by clicking “ok” button, the image should be removed from your database permanently. Show an error toast on the screen if the title or the ID does not exist in the database.



View all (​VIEW​): You will be taken to another screen where you see a scrollable list of all images, their IDs (primary key), and their title.



View range (​RANGE​): You will be taken to another screen where you will be asked about two numbers specifying the range of IDs you want to display. Then by clicking “Display” button you will be shown a scrollable list of all images along with their titles with IDs in the range specified by the user. Show an error toast on the screen if the range is not valid.



Submission Instruction:




Upload your complete Android Studio project directory in a .zip file format on Canvas.






2

Late submission policy: 1 second to 24 hours: -25%, after 24 hours: -100%

More products