views:

34

answers:

1

I have two Image Views that are two football helmets facing each other. I'm wanting to center them and then offset them left/right a little to provide a little space between them. Here is one of the image view's xml at the moment.

<ImageView
   android:id="@+id/hometeam"
   android:scaleType="centerInside"
   android:layout_width="fill_parent"
   android:layout_height="70px"
   android:layout_y="90px"
   android:layout_marginLeft="25px">

I was trying to offset it using [android:layout_marginLeft="25px"] however I'm guessing that's not working for me because of the [android:scaleType="centerInside"]. Anyone know a solution? Thanks!

A: 

set the android:gravity="center" for the Layout.

Praveen Chandrasekaran
Thanks Pentium10, Praveen, that worked replacing the [android:scaleType="CenterInside"] with [android:gravity="center"] and then instead of [android:layout_marginLeft="25px"] using [android:layout_paddingLeft="25px"] ! :D Thanks again
fwaokda