12

I have a quite simple question to ask: I need to put a small logo over an ImageView, large all the screen, in the bottom right area of the screen, but I don't know how to set the coordinates or how to say the ImageViews to be in a relative position.

Something like this:

enter image description here

Stefano
  • 263
  • 1
  • 3
  • 10
  • You can look into FrameLayout. [Heres](http://mobileorchard.com/android-app-development-%E2%80%93-layouts-part-three-frame-layout-and-scroll-view/) a good link, hope it helps you. – Antrromet Jul 13 '12 at 10:00

1 Answers1

11

Try this

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:src="@drawable/ic_launcher" />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/ic_launcher" />

</RelativeLayout>

Output

enter image description here

MAC
  • 15,799
  • 8
  • 54
  • 95