views:

37

answers:

1

I have a linear layout that contains 6 images, which span the linear layout horizontally.

   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@layout/roundedcorner">
        <ImageView
          android:id="@+id/Icon"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/someImage">
        </ImageView>
        ...

The problem is, the first 5 images do not scale and take their pixel width, and the 6th images is scrunched down, because there is not enough space left horizontally.

Is there a way to scale all the images down so they have a uniform look?

A: 

Add android:layout_weight="1" to each ImageView. If images are of equal size, they will be scaled in the same way then.

Konstantin Burov
Thanks amigo!!!!
lheezy