For a layout in a prototype I need a button that overlays a section (an inner rectangle) of an ImageView with an image that is scaled-up preserving aspect ratio. Is there some way to overlay the button over the imageview with defined margins, then scale up this combination preserving the margins? I tried putting both in an additional relativelayout, but the child elements did not scale within the relativelayout (like 2 UIViews might scale when scaling the parent UIView). I also tried hooking into the imageview using adjustViewBounds to shrink the imageview to the scaled-up image, but this didn't work either.
Here is the current layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="0dp"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/placeholderImage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/placeholder"
android:padding="0dp"
android:adjustViewBounds="true"/>
<Button
android:id="@+id/btn"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/darker_gray"
android:onClick="show"/>
</RelativeLayout>