mytechead

Android & Wordpress Help center

How to remove white spaces between images stacked vertically in a linear layout?

Pressing after a long time. But this one will be helpful!

In android system there is a bug [I would call it a bug, make your own choices 😛 ]; If you have a linear layout and you stack two images vertically on the top of each other. The android system gives a gap between the two images. This is quite irritating and I have spent almost 6 hours getting rid of this.

The solution is:

Add the attribute:

android:adjustViewBounds=”true” in the ImageView you are using.

This will alleviate all the pain!

(whew)

 

PS Thanks to the author of this post and the person who answered this :- http://stackoverflow.com/a/3899702/900732

Advertisements

Single Post Navigation

2 thoughts on “How to remove white spaces between images stacked vertically in a linear layout?

  1. androidbethy on said:

    Reblogged this on Android Bethy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: