Try this also Fix the size according to you..or see the resize with universal loader
<ImageView
android:id="@id/ivImage"
android:layout_width="150dp"
android:layout_height="150dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter" />
Used the Android Universal Image-Loader
Declare
private ImageLoader imageLoader1;
On Create
imageLoader1 = ImageLoader.getInstance();
imageLoader1.init(ImageLoaderConfiguration.createDefault(youractivity.this));
no_image here a drawable image without any image load in Cache
DisplayImageOptions
options = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.showImageOnLoading(R.drawable.no_image) // resource or drawable
.showImageForEmptyUri(R.drawable.no_image) // resource or drawable
.showImageOnFail(R.drawable.no_image)
.considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
imageLoader1.displayImage(yourpathURl.replace(" ", "%20"), ivImage, options);
Add gradle dependencies also... download the latest jar of universal loader
The download link of jar
compile files('libs/universal-image-loader-1.9.5-with-sources.jar')
You Can Use Piccaso Also and Glide also