I created a background image bitmap for a view and now the view is being stretched to the size of the background image....
is this normal?
I have faced this same problem.
If the background image has a size that is bigger than the view's size, the view's size will change to match the image's size.
Solution
Set the src
of the ImageView to your background image
<RelativeLayout
.
.
. >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/yourViewId"
android:layout_alignRight="@+id/yourViewId"
android:layout_alignTop="@+id/yourViewId"
android:layout_alignBottom="@+id/yourViewId"
android:adjustViewBounds="true"
//this will allow the image to resize with same proportions
android:src="@drawable/yourDrawable" />
<YourView
android:id="@+id/yourViewId"
.
..
... />
</RelativeLayout>
This all can be done in code of course.