Angelking
Angelking

Reputation: 47

Need the image to be right aligned and centered

Show the list as clickable

From the above post I am able to have the image shown but it only appears on the first line of the title text. I would like it to be centre aligned if the title is 2 or more lines long.

What setting in android Imageview would let me do this?

Upvotes: 0

Views: 92

Answers (1)

sourabh kasliwal
sourabh kasliwal

Reputation: 977

here is the code it will show image in the center

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#FFFFFF"
android:layout_gravity="center"
 >

<ImageView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:src="@drawable/splash"
    android:scaleType="centerInside"
    android:gravity="center"

     />

</LinearLayout>

Upvotes: 1

Related Questions