N
N
newdancer2016-07-06 12:43:48
Android
newdancer, 2016-07-06 12:43:48

How to remove padding on top and bottom of Imageview in Listview?

How to remove padding on top and bottom of Imageview in Listview item itself at low resolutions?
At 1280x768 there are large paddings at the top and bottom of the Imageview
eefcf3906476409aa3ff8a03af0a9847.png
At 1920x1080 this is not the case.
ecc2126be6284cb19d38f7c037ea05e5.png
The list item itself looks like this:

<RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <ImageView
                android:id="@+id/icon"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scaleType="fitCenter"
                android:layout_marginBottom="@dimen/post_text_padding" />
        </RelativeLayout>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MikkiMouse, 2016-07-06
@MikkiMouse

android:adjustViewBounds="true"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question