Android Cannot disable listview header dividers

398 views Asked by At

I am trying to disable dividers on a listview header.

setHeaderDividersEnabled(false) : KO

android:headerDividersEnabled="false" : KO

The only think that seems to work is to set dividers height to 0 which removes all dividers. :/

I think that an issue with Android 4.4.2 and above. Can someone helps me please :).

Br.

[Edit]: I cannot change the divider for the rest of the listview I need to disable it only for the header:s

1

There are 1 answers

1
Jorgesys On

One option would be changing the color of your divider for a transparent color:

<ListView 
    android:id="@+id/android:list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:divider="@android:color/transparent"/>