I am using an Imageview to show an image. If I set the image in background then its taking full widths and height under status bar and navigation bar. like as in below screen. And the image is streching.
<ImageView
android:id="@+id/imgLoginImageSlider"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/slider2" />
In the second case if I set image using Glide then this same image not taking full widths and height. There is some space in top and bottom of the image. Like in below image.
Glide.with(context).load(model.getDrawable_img()).into(holder.binding.imgLoginImageSlider);
But I want to set the image using programmatically, How to do then. Any help? Thanks in advance. Image should not be streach.

