Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-无边框背景图像_Android_Image_Layout_Background - Fatal编程技术网

Android-无边框背景图像

Android-无边框背景图像,android,image,layout,background,Android,Image,Layout,Background,我想在活动中设置一个图像作为背景。 问题是我使用了边距,而图像并没有填满整个屏幕。但我需要边际价值 <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:backgroun

我想在活动中设置一个图像作为背景。 问题是我使用了边距,而图像并没有填满整个屏幕。但我需要边际价值

 <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" >


我能做什么?

用padding=替换布局_margin=,padding在里面