Android Volley with Image Caching
Currently I'm working with an application where one activity holds a list view with image and text for each row. I'm downloading the images using the volley. When the list view item is clicked the app will switch to a another activity with a detail view where a large version of the clicked image will show. For the both time I'm using NetworkImageView. Images are loaded in the list view with caching. But the problem appeared on the detailed view. The images are showing from the previously loaded cache with low resolution. I want to load a good resolution image on detailed view which will cache the image separately for large view. For the both screen image url are same. How to do that ? Thanks in advance.
First thing is a bit obvious - make sure you images are at the wanted quality. If that's the case, you'll probably want to load the image "manually" using the ImageLoader class, as the NetworkImageView by default, optimizes the size of the Bitmap it creates to be the size of the view itself. So what happens is, you first load the thumbnail view which is small, and the saved Bitmap is created in that size instead of the original image size. Then, when the bigger view requests the same image, the cached version is returned which is a small Bitmap, and the view scales it up, creating the low-res appearance. Try using ImageLoader.get() with the width and height appropriate to the bigger view in the detail screen. The other alternative is to load 2 versions of the same image.
what if LocationListener.onLocationChanged is not called?
Add Item from EditText to RecyclerView
weird behavior of menu items in android app
ListView with CursorAdapter is not refreshing even if I use swapCursor or changeCursor methods in Android
How do I find out programmatically which mode of Location is turned on?
Using Revmob Ad SDK with Android app on Game Maker
Admob Error: Not enough space to show ad. Needs 320x50 dp, but only has 309x0 dp
How to use BindView Method with payload argument to update only specified part of list item in RecyclerView?
Android App Install Script Mechanism / Method
Two Button Placed front and behind in FrameLayout?
Do not resize children in immersive mode
Add EditText dynamically with (if possible) String id into a Fragment
Running under Android Studio's Run corrupts the stored view
How to check socket status from other classes in android?
How does an Android Studio deal with System.out.print functions when making a final version of an app?
MultiDex error after updating GCM gradle