蓝色是什么颜色线条显示是背景图像。名字是蓝色背景。它位于 gridview 和 Bottomheader 的后面。
请告诉如何删除这个蓝线空间。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bluebackground" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="48dp"
android:src="@drawable/blackheader" />
<EditText
android:id="@+id/etxsearch"
android:layout_width="300dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/imageView1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/searchtext"
android:textSize="18dp" />
<GridView
android:id="@+id/gvMain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/img_bottomheader"
android:layout_below="@+id/imageView1"
android:background="#000000"
android:horizontalSpacing="1dp"
android:numColumns="3"
android:scrollbars="vertical"
android:smoothScrollbar="true"
android:verticalSpacing="1dp" />
<ImageView
android:id="@+id/img_bottomheader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:src="@drawable/bottom" />
</RelativeLayout>
蓝色背景后面显示空间。
最佳答案
尝试删除:android:layout_marginTop="48dp"
关于java - 如何删除xml布局背景中的空格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13156007/