辅导159.336课程程序、 写作Python,Java程序语言

” 辅导159.336课程程序、 写作Python,Java程序语言159.336 Assignment 2Due 18th September 2020For this assignment you need to write a simple gallery application for Android to view all the photos that are stored on thedevice.The gallery must show a Scrollable grid of all photos. When you click on a photo it must open in a separate activity whichshows only that photo.Your app must use a GridView or RecyclerView and an Adapter, the Adapter must load photos using a background thread.Use the MediaStore content provider to get a Cursor for all photos ordered by date added with the most recent first. The filepath for a photo is stored in the MediaStore.Images.Media.DATA column.You can use BitmapFactory.DecodeFile with inSampleSize Options to load a low resolution image andThumbnailUtils.extractThumbnail to create a reasonable size thumbnail. You may need to rotate the thumbnail depending onthe MediaStore.Images.Media.ORIENTATION. 辅导159.336课程作业、 写作Python,Java程序If you use a target API of 29, you need to set requestLegacyExternalStorage to true in the manifest file to allow access to thefilesystem. If you use a target API of 30, use a content URI with the _ID column appended and BitmapFactory.decodeStreamwith ContentResolver.openInputStream instead of decodeFile and the file path.To speed up loading you may want to use a cache of thumbnails. You are not allowed to use an image library such as Picassoor Glide but you can use a Memory or disk cache as described here: httpss://developer.android.com/topic/performance/graphics/cache-bitmapThe single photo activity view should have a higher resolution than the thumbnail. You can optionally add pinch to zoom to thephoto viewer and gallery. Make Sure your app behaves correctly when the device is rotated and when photos are added ordeleted. Make sure your app works with large images, i.e. up to 12MP.Submit your assignment on Stream. You must submit a zip file containing a clean source tree. To do this, use Build..CleanProject in Android Studio and then create a zip file of the app directory. You do not need to submit an apk. Do not use anylibraries other than those included in the latest Android SDK. Marks will be deducted for zip files which do not build correctly.This is an individual assignment, you can not work in groups. Marks will be awarded for well written programs. Use commentsin your code to document it. Marks will be subtracted for plagiarism, late submission and bad documentation.This assignment is worth 10% of the total marks for the course.M Johnson 2019如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导