android


Pre fetching Images using Glide in android


I have an activity which will loads images one by one in same imageview using fadein fadeout animations. In order to provide a good user experience i want to pre fetch the images asynchronously and show them with a constant flow. I want to use glide for achieving the above said behaviour. But i am confused because there are two different approaches I found on internet to pre fetch (Cache) images. First is using Glide's .preload() method:
Glide.with(this)
.load(url)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.preload()
Second is using Glide's .downloadOnly(int , int) method:
Glide.with(applicationContext)
.load(yourUrl)
.downloadOnly(500, 500);
I have two questions:
What is difference between preload and downloadOnly and which one best suites my situation?
How to know that all of my images have been pre fetched and i can continue the process of showing images using one of the above (Best one) approaches?

Related Links

Android dialog called as intent is not showing the background screen. It is showing black backgroud
Is it possible to have an AdView inside of a LinearLayout which shrinks the AdView to 180px width
Android WebView : Default Save As Context Long Press
my app gets installed on the android emulator but it fails to run and there are no errors
How to get screen display metrics in application class
Why runtime can not recognize string defined in “res/values/strings.xml”
Android - How to get current user coordinates/location on demand?
Android: keep a TextView at the same locaton on a bitmap regardless screen type
make notification when clicking app bring to front
Android: Eclipse autocomplete does not work in xml files
Will ActionbarSherlock in APK file of my own project?
Change package manager application info meta data in android
sending images from gallery
Removing the margin from bottom in android Relativelayout
How to implement 3D / tilt mode in mapview?
Android calendar : created an event using intent , but it does not go back to my activity

Categories

HOME
httparty
grok
google-cloud-platform
gpu
spring-data-mongodb
mips
cakephp-3.4
vxml
nested-if
babeljs
mapbox
android-json
odoo-8
bing-maps
p2p
project
jxl
nancy
comsol
searchview
dreamweaver
template-engine
asp.net-mvc-viewmodel
digital-signature
selinux
lilypond
inno-download-plugin
visual-studio-extensions
pimcore
object-storage
moses
apktool
quantlib
left-join
glib
fstream
erb
dsx-desktop
getpixel
sharding
numpy-broadcasting
video-capture
swagger-php
playframework-2.1
reactivekit
loading
linq-to-objects
comparison-operators
lpsolve
file-sharing
apache-directory
memory-mapping
automapper-5
clarifai
rserve
context-sensitive-grammar
excel-dna
cmp
reachability
visual-studio-2008-sp1
stax
envi
google-cloud-console
mta
nullable
design-principles
user-management
phpgrid
avisynth
page.js
rpart
skspritenode
botan
alloy-ui
mraid
xmltype
public-html
angular-gettext
sip-server
strawberry-perl
codeplex
parallel-testing
reflector
cfcache
bin
kendo-dataviz
beaker-testing
jquery-1.9
mysql-error-2013
device-width
onmousemove
frameworkelementfactory
jquery-blockui
lambdaj
oracle-enterprise-linux
window-decoration
koken
pinch
htdocs
catransform3d
rmdir
tmx
codebase
appledoc
cruisecontrol.rb
application-verifier
qtabbar
lalr
dsl-tools
visualj#
google-wave
dojo-dnd
windows-identity
java1.4

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