skip to Main Content

enter image description here

this is my application. I want the images in this recycler view to fill the whole screen. As in Instagram (I set the width of the Image View to match parent)

enter image description here

I want it to look like this

2

Answers


  1. try setting your imageview width to 0dp and if this doesn’t work then try setting scaleType to fitXY.
    Let me know if this works or not!

    Login or Signup to reply.
  2. Try using adjustViewBounds attribute, also you can use scaleType attribute if you want to scale the image:

    <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:adjustViewBounds="true"
            android:src="@drawable/ic_launcher_background" />
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search