Not sure how applicable this is, but if you are trying to do this (pseudocode):
<LinearLayout>
<TextView />
<ImageView />
</LinearLayout>
As you discover, you will have problems with this if you change it like this:
<LinearLayout Background="YourImagePath">
<TextView />
</LinearLayout>
It will probably be easier for you.
Assuming you are not creating a derived type or drawing yourself like others suggest.
source
share