How can I only have one divider for the listview in Navigation Drawer? I tried using android:divider but that produces multiple lines! I only want a line after my 3rd item. How can I do that? (Sorry can't post image because of reputation)
Asked
Active
Viewed 347 times
0
-
Try this: http://stackoverflow.com/questions/30916946/android-navigationview-menu-group-divider if you are using a menu resource – Lewis McGeary Aug 28 '15 at 18:19
-
how can i use the menu thing? – Hubert Hung Aug 29 '15 at 07:55
-
the menu thing doesn't work – Hubert Hung Aug 29 '15 at 08:08
-
check this: http://stackoverflow.com/questions/30243365/how-to-add-one-section-separator-for-navigation-drawer-in-android – Mohammad Sayed Oct 18 '15 at 13:41
1 Answers
0
You can't by default. One way you can do it as a workaround is by adding a conditional to your getView
method, check if the position
is 2 (third item) and add the divider to it -- maybe as an additional layout.

Paulo Avelar
- 2,140
- 1
- 17
- 31