Resize images with Glide in a ImageView Android
Override
must be accessed via RequestOptions
in the most recent version of Glide 4.x
. You can add RequestOptions
through apply()
Glide .with(context) .load(path) .apply(new RequestOptions().override(600, 200)) .into(imageViewResizeCenterCrop);
in glide 4.x 'override' is in 'apply' :
Glide.with(getBaseContext()) .load(path) .apply(RequestOptions.placeholderOf(R.mipmap.no_wifi) .error(R.mipmap.no_wifi) .override(500,500)) .into(mImageView);
Glide .with(context) .load(path) .apply(new RequestOptions().override(600, 200)) .centerCrop() .into(imageViewResizeCenterCrop);
@Raghunandan is right.you should try transformation your own way.