-3

Hey how can i hide the dark line on the ground of my row in the listView. Or to make the line smaller is also ok. Thank you all.

enter image description here

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:paddingTop="2dip"
android:paddingBottom="3dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="22sp"
android:textColor="@android:color/background_dark" />

<ListView
        android:id="@+id/listView2"
        android:layout_width="match_parent"
        android:layout_height="348dp"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="153dp" />

    <ListView
        android:id="@+id/listView1"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:layout_alignParentBottom="true"
        android:layout_marginLeft="20dp" />
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Sven
  • 31
  • 11
  • 1
    share the layout xml ... that is generating the view – Relsell Apr 08 '18 at 17:53
  • Duplicate:: https://stackoverflow.com/questions/1914477/how-do-i-remove-lines-between-listviews-on-android :: https://stackoverflow.com/questions/10163200/how-do-i-remove-the-divider-from-a-listview-on-android :: https://stackoverflow.com/questions/7081514/remove-listview-separatorin-the-xml-layout-file – Barns Apr 08 '18 at 18:07

1 Answers1

2

Try the following:

//Hide the divider
getListView().setDivider(null);

//set the divider height
getListView().setDividerHeight(0);

Or, if you want to do it in XML:

android:divider="@null"
android:dividerHeight="0dp"

Here is the Developer Notes

Also check the other threada about this problem: How do I remove lines between ListViews on Android?