Android seperator行是fill parent..我想适应黄金边界…我该怎么做?

Android seperator行是fill parent..我想适应黄金边界…我该怎么做?,android,custom-lists,Android,Custom Lists,在这张图片中,金色的分隔线不适合屏幕…我希望这条线适合屏幕…我使用了填充父项…但这给了我这种布局 这是我的自定义xml文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height=

在这张图片中,金色的分隔线不适合屏幕…我希望这条线适合屏幕…我使用了填充父项…但这给了我这种布局

这是我的自定义xml文件

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:id="@+id/main"
     >




<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="40dp" 
    android:layout_centerVertical="true" android:background="#000000">

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="10dp"
        android:layout_height="10dp"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginRight="1dp"
        android:src="@drawable/arrow" />




    <LinearLayout
        android:id="@+id/linear1"
        android:layout_width="fill_parent"
        android:layout_height="2dp"
        android:layout_alignParentBottom="true"
        android:background="@drawable/seprater_line" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="TextView"
        android:textColor="@android:color/white"
        android:textSize="18sp" />

</RelativeLayout>
</RelativeLayout>


列表视图的分隔符与列表视图本身一样宽。查看屏幕截图,您已经为
ListView
设置了一些边距或填充,从而也为分隔符设置了边距/填充。删除这些属性,您的分隔符将覆盖整个屏幕宽度。通过为行本身定义自定义xml文件,如果需要,可以在其中添加自定义填充/边距。

问题中引用的图像在哪里?将列表视图的宽度设置为“填充”父级,并从左到右不为其提供边距。@Shalini他所说的屏幕截图是图像。实际上,列表视图中有一个填充。如果你发表你对金线的看法,我会给你解决办法。@Yogessomani我用了fill_parent,没有给任何边距。。。