0

i'm searching for a way to set coordinates for my imageView. i want to put other images on the coordinates.

ImageView img1 = (ImageView) findViewById(R.id.imageView1);
img1.setAdjustViewBounds(true);

My layout is like that :

<RelativeLayout android:id="@+id/rellayneuuuu"
    android:layout_width="fill_parent" android:layout_height="fill_parent">
    <ImageView android:id="@+id/imageView1" android:scaleType="centerCrop"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:src="@drawable/image1" />
    <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:src="@drawable/icon"
        android:layout_marginTop="40px" android:layout_marginLeft="40px" />
</RelativeLayout>

thanks

Sephy
  • 50,022
  • 30
  • 123
  • 131
bebe
  • 11
  • 1
  • 4

1 Answers1

0

I'm not sure to understand you properly, but from what I get of your problem, this question might just give you the answer you're looking for...

EDIT

I don't think that RelativeLayout is designed to hanlde this kind of behavour, maybe you should have a look at Framelayout which actually is design to support superposition of views.

Community
  • 1
  • 1
Sephy
  • 50,022
  • 30
  • 123
  • 131
  • no, thats not what i mean. i have a image (img1) and i have another image (img2) ON img1. and i'm trying to place the img2 at a certain place on the img1, because i have to place some other images on the img1. – bebe May 04 '11 at 07:52
  • I've got the same problem @bebe Did u found a solution? – Luciano Mar 19 '12 at 09:19