Reputation: 3692
I'm using a bitmap as a background for activity. The code of the custom background is:
<item>
<bitmap android:src="@drawable/fog"
android:layout_width="match_parent"
android:adjustViewBounds="true"
/>
</item>
However it sits in the middle and doesn't occupy the entire screen space. How can I make it fill all the available space? I tried setting width and height to fill_parent.
Thanks
Upvotes: 3
Views: 2899
Reputation: 7104
android:scaleType="fitXY" is what i use to fill imageviews, i never had bitmap as item, theres cropping ones too
Upvotes: 0
Reputation: 1172
I agree with the @androidz post. To avoid distortion, you can use the setAdjustViewBounds function (see here).
Upvotes: 1
Reputation: 401
try adding:
android:layout_width="match_parent"
android:layout_height="match_parent"
Upvotes: 1