android: how to align image in the horizontal center of an imageview?
- by Yang
I've tried all scaletype in gravity, but all of them result in the image to be at the left corner of the imageview.
<ImageView
android:id="@+id/image"
android:scaleType="centerInside"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dip"
android:background="#0000"
android:src="@drawable/icon1" />