android


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.

Related Links

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

Categories

HOME
shell
grok
oracle12c
localization
android-studio-2.2
datastore
3d
apache-spark-mllib
ms-access-2016
opendj
newrelic
dojo
why3
ycsb
naivebayes
frequency-distribution
asp.net-mvc-viewmodel
nim
gmm
lilypond
data.stackexchange.com
fragment-backstack
jaws
failover
winpe
calculation
dumpbin
hibernate-validator
slacktextviewcontroller
baidu-map
fiware-cygnus
apic
playframework-2.1
watchman
imagenet
openalpr
node-mssql
google-data-api
unordered-map
comparison-operators
ogc
ssrs-2014
congestion-control
importerror
fwrite
dynamic-linq
dotnet-httpclient
netbeans6.8
configurationmanager
otp
lsyncd
monkey
baidu
async.js
flex4.6
dbamp
hadoop-partitioning
uiactionsheet
nupic
piracy-prevention
toran-proxy
assertion
sciruby
themoviedb-api
android-launcher
branch-and-bound
node-serialport
cross-join
exceldatareader
at-job
packet-sniffers
filesplitting
big-ip
deform
sql-scripts
easyrtc
cocos3d
create.js
decoupling
getopt
rfc5322
gwt-openlayers
mt4j
gtm-oauth2
model-driven-development
cffile
process-explorer
scmmanager
wimax
device-width
predicatebuilder
jquery-address
saxparseexception
w3c-geolocation
tmx
tabpanel
spread
wordprocessingml
ifilter

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App