Download blur image before actual image gets downloaded in android - android

I want to do image downloading as whatsapp does as blur images appear and when we click on image clear image gets downloaded.I want to do the same kind of work in my android App.Can anyone suggest how to achieve this?

You can use any image loading liabrary(Picasso,Glide or UIL)
Firstly load image of low quality say if you using Picasso
Picasso.with(this).load("....").resize(100,100).into(imageViews);
than on click load full image.

Related

How to update image by a developer that is set into a imageview by load(url) method of glide?

I am new in android app developing and got stuck in this problem. To understand my problem -
Let, I am a developer and I have an app. The app has a imageview. In that imageview, the image will be loaded using glide load(url) method from my(developer) website. Now I(developer) want to change the image that will be shown in the app same imageview. But if I change the image the image url will be changed and glide load(url) method will not be able to download new image? How can I solve this problem or what topic should learn to handle this issue or what is the alternative?
Download image
Save to disk (optional)
Modify image (optional)
Show modified image in ImageView.
(You don't need glide here)

which is best? Creating bitmap from imageview or downloading the file

we are using an app for setting wallpaper in android device, for that we are doing below steps
1) we have set of images and URLs
2) We are fetching the URL on an Imageview
so now we have to set the wallpaper, for that we need the image file, which is the best way to do it?
1) Download the file directly from URL and store it in a local storage and use it as wallpaper.
or
2) Create a bitmap from the Imageview and use it as wallpaper.
Doing the second option will reduce any quality of the image we using?
First option how to we can do it?
We have fetch the images successfully inside the application.
Always prefer to cache your image downloads so that you don't have to repeat the task. Using libraries like Picasso or Glide reduces a lot of effort is handling your images while at the same time optimizing your code.
Additionally it's best to use the original image as wallpaper rather than consuming the image view because if you have set any scale type's on your image view then your image will be cropped.
Picasso allows for hassle-free image loading in your application—often in one line of code!
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

Android Universal image loader set background

I'm using android universal image loader for loading some image in a gridview. The thing is I want these images to have also a background image, I mean two images on top of each other, I looked at universal image loader to see if there are any options to set such image but I couldn't find any.
I'll appreciate if someone can help me with this.
Thanks very much

Load a downscaled image with Android-Universal-Image-Loader

I am using Android-Universal-Image-Loader to load an image into an imageView. Is it possible to show a downscaled version of the image i am loading while the original image has not yet loaded?
As suggested here, the way to achieve your goal would be prepare and download two images, one with less size to show as preview while the big one is downloading

Android: recover an image which it has been loaded

I want to load and scale an image from an URL in a imageView.
Then, when user touch that image, I want to load the image (without scale) in other imageView or webView for example.
The problem is that I don't want load image twice. The first time, it download in somewhere (cache?) and I want recover for not doing two request...
some example? suggestion?
thanks
you should consider to load first just a thumbnail of the image and wait with downloading the real one until the user really wants to see it.
for caching see LruChache
This tutorial should help with caching: http://codehenge.net/blog/2011/06/android-development-tutorial-asynchronous-lazy-loading-and-caching-of-listview-images/
If you have lots of images, consider using an LruCache. It helps manage large amounts of cache data.

Categories

Resources