I am trying to place two ImageButtons on an ImageView. I'm using RelativeLayout (also tried FrameLayout) in the XML file. But this just places the three elements (ImageButtons and ImageView) at location 0,0 at the top left corner even if I specify layout_marginLeft, layout_marginRight etc for the ImageButtons.
The XML looks like the below: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0sp" android:layout_marginTop="0sp"></ ImageView> <ImageButton android:id="@+id/nextButton" android:src="@drawable/ arrowright" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginRight="0sp" android:layout_marginTop="0sp"> </ImageButton> <ImageButton android:id="@+id/prevButton" android:src="@drawable/ arrowleft" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="0sp" android:layout_marginTop="0sp"> </ImageButton> </RelativeLayout> I want the two buttons on top of the screen on the left and right sides on top of the image. Any suggestions as to how this can be done? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en