I want to display a static google map on an imageview. Something similar to \"Whatsapp\" showing while share the location. How can I do this?
Also, another solution is the Picasso library: "A powerful image downloading and caching library for Android"
You give an image url to Picasso and then It does a GET petition and it loads the image. If the petition fails then Picasso can set a default image.
You can even set a progress animation while the image is loading.
It is a good and clean solution.
A example:
ImageView ivUrl = (ImageView) view.findViewById(R.id.iv_photo);
Picasso.with(getContext()).cancelRequest(ivUrl);
Picasso.with(getContext())
.load(imageUrlString)
.error(R.drawable.ic_error)
.placeholder(R.drawable.progress_animation)
.into(ivUrl);