Android card view has thin gray line in between cards

╄→尐↘猪︶ㄣ 提交于 2019-11-29 04:36:42

dividerHeight should work. As a workaround you could change the colour of divider to your background color or to transparent colour

<ListView 
 android:id="@+id/android:list"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:divider="#E6E6E6"
 android:dividerHeight="0px"/>

You can also try to this trick:

 android:divider="@null"

I've just had the exact issue. Nothing from the XML was having effect on the outcome of the listview. Instead, as already mentioned in a comment by Quanturium, I went to my ListFragment's onActivityCreated and added -

getListView().setDivider(null);
getListView().setDividerHeight(0);

Hope this helps!

It looks like you are using a listview, try setting this parameter in your listView android:dividerHeight="0px"

It appears that you are using a listview and this XML is the listitem. The gray line is the list divider. Set it to zero like this android:dividerHeight="0dp" for the listview.

I need put

dividierHeight = 0px

and chage color equal my backgroud color, in this case

android:divider="#FFFFFF"
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:dividerHeight="0px"
android:divider="#FFFFFF"
/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!