android


Gif image is not showing its animation in android application


In my android application, I am using universal image loader to show images from url. During loading of image I want a gif image to be shown. But the gif image added is not showing any animation.
Here is my code to display image.
private static final DisplayImageOptions.Builder DEFAULT_DISPLAY_IMAGE_OPTIONS_BUIDLER = new DisplayImageOptions.Builder()
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.displayer(new FadeInBitmapDisplayer(300, true, false, false))
.showImageForEmptyUri(R.drawable.default_image)
.showImageOnLoading(R.drawable.loadingx)
.showImageOnFail(sampleapp.sample.com.sampleapp.R.drawable.default_image).cacheOnDisk(true)
.cacheInMemory(true).bitmapConfig(Config.ARGB_8888);
what changes should I make to show an animated gif image during loading time image
Universal Image Loader doesnot Support Gif see this Try using other libraries like Glide which supports gif
Glide.with(context)
.load(imageUrl)
.asGif()
.placeholder(R.drawable.yourgif)
.crossFade()
.into(imageView);
Try to use glide for gif image loading...
Glide
.with( context )
.load( gifUrl )
.asGif()
.error( R.drawable.full_cake )
.diskCacheStrategy(DiskCacheStrategy.SOURCE)`
.into( imageViewGif );
to understand follow the link below -
enter link description here

Related Links

Android one shape resource file for different buttons
retrieving data from database mySQL, application has stopped (Android studio)
android Error:(44, 13) Failed to resolve com.esri.arcgis.android:arcgis-android:10.2.7
trigger for LayoutDirection for android
push notification repearting for every second
fetch all photos from gallery and show it in grid view
In android, how to know if a notification is a new one or a repeated one?
Which is more efficient? Loading from memory a full sized bmp or decompressing a png
Retrofit 2 check call URL
Android : JAudioTagger doesn't change the tags
How to directly send touch events to /dev/input/event?
Access Recyclerview viewholder from activity
android studio.. there are no error in code but there are exeption
Add view in Android
can't see backgound image when i run my app on android phone
Android app is crashed on clicking button

Categories

HOME
grok
checkstyle
rdbms
toolbox
nuget
edge
scripting
web-hosting
code-coverage
recordrtc
g++
commonjs
vimdiff
xcodebuild
video-editing
git-extensions
blade
backpack-for-laravel
react-toolbox
onload
flooding
amazon-quicksight
alm
userdefaults
scatter3d
kodi
android-sugarorm
linkedhashmap
indy10
lubridate
sql-server-ce
graphhopper
nohup
vmware-fusion
logback-groovy
avcapturedevice
apache-directory
mesosphere
opennms
tinymce-3
pair-programming
scalding
modelsim
backbone-collections
d3-force-directed
google-photos
seek
nikeplus-api
avspeechsynthesizer
refinerycms
omniauth-facebook
aspen
piracy-prevention
oracle-spatial
ons-api
binomial-theorem
j-security-check
mmwormhole
apache-spark-1.3
unix-socket
ss7
malformedurlexception
spring-remoting
openargs
mysql-error-1044
ui-select2
swfobject
booksleeve
device-width
web-notifications
onmousemove
database-create
azman
usertype
mbeans
uipagecontrol
message-passing
zend-rest
echo3
dojo-dnd
sifr3
online-storage
mathematical-typesetting

Resources

Encrypt Message