Deno Agüero
Deno Agüero

Reputation: 599

Android - Background Image without margin

I want to set a image as background in my Activity. The problem is that I use margin and the image doesn't fill the whole screen. But I need the margin value.

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:layout_margin="15dp"
 android:background="@drawable/main_background"
 android:orientation="vertical" >

What can I do?

Upvotes: 1

Views: 1025

Answers (1)

yoah
yoah

Reputation: 7230

replace layout_margin= with padding=, padding is on the inside

Upvotes: 3

Related Questions