I want to use an ImageView as a background watermark. I would like the image to be partially offscreen (think of it as in the bottom right corner of the screen and then pushed another 20% to the right and 10% down), but I can't figure out how to arrange my view like that. I don't need animation or anything and I would like to avoid just cropping the image because: 1) we use this same non-cropped image elsewhere and I'd rather not duplicate it and 2) I'm working with several layouts which may have different positioning of this image requiring multiple cropped copies.
I've tried several different layouts and I've tried setting the position of the ImageView in my onCreate, onStart, onResume, etc., but the width and height of all of my views are will 0 by 0. It's incredibly frustrating that something so simple should require so much work.
UPDATE: Here is the xml layout I am using... I have tried numerous variations on this, this is just what I happen to have at the moment which also doesn't work:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rootView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<ImageView
android:id="@+id/watermark"
android:src="@drawable/dollar_sign_whole"
android:gravity="right|bottom"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginRight="-50dp"
/>
<ListView
android:id="@+id/tableView"
style="@style/WatermarkedTable"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:cacheColorHint="#00000000"
android:divider="#ccc"
android:dividerHeight="1dp"
/>
</RelativeLayout>