Challenge : Preloading and Caching

Hello everyone , i managed to finish that challenge for the caching . i think the preloading will bit a bit smiller

so, first we define this line at the instance variable scope .

picasso p ;


at OnCreate() function in PhotoGalleryFragment we put those lines for defining new picasso wirh configurations

 p = new Picasso.Builder(getActivity())
                .memoryCache(new LruCache(24000))


at the function bindGalleryItem() we put those as the instructor mentioned

public void bindGalleryItem(GalleryItem galleryItem) {




at onBindViewHolder we put this code at the end

photoHolder.bindGalleryItem(galleryItem); //does everything by picasso