Sinan Kara
Sinan Kara

Reputation: 117

How to disable the line divider in the navigation menu?

I want to disable the line divider in my navigation menu. I tried a code out, but it doesnt worked. I hope someone can help me :) That is the code that I tried:

 <item name="android:listDivider">@android:color/transparent</item>

Upvotes: 2

Views: 197

Answers (1)

Jorgesys
Jorgesys

Reputation: 126563

Ok you have to add the Style :

<item name="android:listDivider">@android:color/transparent</item>

but you have to define it as background in your divider view :

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">

    <View android:layout_width="match_parent"
          android:layout_height="1dp"
          android:background="?android:attr/listDivider"/>

</FrameLayout>

Upvotes: 1

Related Questions