How to fit Image into ImageView using Glide

You can use centerCrop() or fitCenter() methods:

Glide.with(context)
     .load(url)
     .centerCrop()
     .placeholder(R.drawable.default_image)
     .into(img)

or

Glide.with(context)
     .load(url)
     .fitCenter()
     .placeholder(R.drawable.default_image)
     .into(img)

You can also find more information at: https://futurestud.io/tutorials/glide-image-resizing-scaling

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)