Skip to content Skip to sidebar Skip to footer

Linearlayout Not Wrapping Content

I used LinearLayout to stack 4 images horizontally and it works well except for the height. It seems that the linearlayout is not properly wrapping its content. If I don't set the

Solution 1:

Try setting the adjustViewBounds attribute to true for those images. http://developer.android.com/reference/android/widget/ImageView.html#attr_android:adjustViewBounds

That should take care of that extra space you have and the LinearLayout should wrap_content correctly.

Solution 2:

Solution 3:

android:adjustViewBounds="true"to be setin your imageview's

Post a Comment for "Linearlayout Not Wrapping Content"