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

When does the Debugger get disconnected?
Android: MainActivity is suddenly created again in different Activity without being called?
Audio file uploaded from android not working in ios
How to recreate all fragments in ViewPager:
Ecommerce Android is not shown in analytics
How to swipe and switch between two images?
Android Mapview show white tiles without any map
How can i save audio from speech recognition API?
Navigation tabs with fragments to which to add another fragment
Get the category of any app programetically in Android?
PhoneGap for Android - Connect to Database
Passing data from a Service
Building cocos2d-x android project failed: Unknown EABI object attribute 44
Add a layout in a view
Android Programming ViewPager from a GridView
Monitoring wifi state change since boot time in Android

Categories

HOME
url-redirection
jpa
wakanda
webdriver
github-for-windows
obfuscation
sublimetext
appcelerator
vxml
gembox-spreadsheet
echo
pearson-correlation
gluon-mobile
modal-dialog
plink
coin3d
modbus-tcp
pyramid
solrcloud
imagemap
aggregation
gpio
pylons
apktool
intersystems-cache
soot
jaws
dst
playstation-portable
fstream
python-import
swagger-php
salesforce-communities
xcode7.3
dm-script
android-augmented-reality
amazon-ses
z-notation
health-monitoring
metawidget
watchface
install.packages
apollostack
drupal-theming
memory-mapping
dynamic-linq
vugen
tinymce-3
tf
insight
boo
juice-ui
stripe-connect
simplepie
flex4.6
mongodb-php
expectations
lean
pre-build-event
yajsw
lz77
fuzzywuzzy
nullable
pushbots
phpgrid
pypiserver
vigenere
lazybones
django-urls
intel-c++
video-player
canvg
zend-currency
rrule
openbabel
uncaught-typeerror
genymotion-call
lambda-architecture
winginx
authlogic
menubar
embedded-fonts
jeromq
neos-server
cnf
route-provider
fb.ui
robotlegs
matlab-load
pylucene
cgbitmapcontextcreate
clrstoredprocedure
xui
collectionviewsource
ruby-1.8
binomial-heap
zend-rest
zen
silverlight-oob
alsb
java1.4
pbcopy
appliance

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