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 RSS Application Model and Custom ListView Adapter - How to show all rss items?
Building APK on linux is always blocked
Android:Running Intent Service Multiple Times
how to update sqlite to add a new column [duplicate]
Update query is not working in cordova sqlite storage plugin
How to find out that screensaver is enabled?
Android app crashing with art/runtime/fault_handler.cc:117 Check failed: !initialized_
When does the adapter implicitly refresh itself?
Is it good to build a gRPC server on an Android device?
android voice pitch detect
Shared Element Transition with Android DataBinding
How to get Height of ImageView when it is set to wrap_content
href in area tag not clickable in android gmail app
Is permission delegation from Manifest permissions to other application via Implicit intent and then to a third app via grantUriPermission() possible?
Android: Unwanted White Box at Top of Screen (toolbar?)
Socket java.net.ConnectException: failed to connect while connected using wifi direct

Categories

HOME
embedded
httparty
microsoftgraph
gridview
design-patterns
static
saml-2.0
database-normalization
alsa
3d-reconstruction
gembox-spreadsheet
jetty
google-admin-sdk
crystal-reports-2013
opengl-3
okhttp
openpyxl
mxgraph
comsol
azure-iot-hub
git-extensions
mapstruct
lilypond
symbols
ag
undertow
rubymotion
libigl
siri
itunes
progress-bar
user-defined-functions
jaws
dotspatial
turfjs
angularjs-material
card.io
getpixel
least-squares
salesforce-communities
flatmap
connection-pool
projects-and-solutions
gdata
branching-and-merging
jide
dynamic-linq
httrack
ovf
trojan
reindex
stdmap
ngmaterial
lsyncd
d3-force-directed
rmongo
rocks
cubism.js
grails-plugin
autosar
redistributable
burrows-wheeler-transform
jodd
cda
libav
thread-sleep
crouton-os
microsoft-reporting
opserver
extjs-grid
amiga
wso2greg
sha512
apache-commons-daemon
cwrsync
aspectj-maven-plugin
android-broadcast
public-html
grouping-sets
nodelist
theos
android-vibration
ghcjs
deform
genymotion-call
tweenlite
ray
mysql-error-1044
scrypt
unit-of-work
gpars
cnf
composite-component
wp7test
mantle
apache-abdera
curb
midlet
qtconcurrent
boost-signals
multiplexing
usertype
promotion-code
update-statement
google-ajax-api
timthumb
nhprof
metaweblog
object-database
nstokenfield
strtod
skype4java
silverlight-oob
java1.4
ifilter
cardspace
great-circle

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