loop
loop

Reputation: 9242

Set ImageView to bottom

Hi I am trying android and i am WP c# developer. So having a problem to set the image to the bottom middle of the screen. In WP it is quite easy for me. so here what i have attempted :-

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ImageView
        android:src="@android:drawable/ic_menu_gallery"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/appLogo" />
</LinearLayout>

In WP i just do it in a Grid and set VerticalAlignment = Bottom and done.

My mindset is not set for android right now so sorry for the very basic question. any help and pointers are highly appreciated :)

Upvotes: 1

Views: 76

Answers (1)

user1282637
user1282637

Reputation: 1867

You might have to put it in a RelativeLayout and then use android:layout_alignParentBottom="true" on your ImageView. Like this:

<RelativeLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <ImageView
        android:src="@android:drawable/ic_menu_gallery"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:id="@+id/appLogo" />

</RelativeLayout>

Upvotes: 1

Related Questions