0

Gmail app: Gmail app

My app: My app

menu/drawer.xml:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <group android:checkableBehavior="single">
        [..]
        <item
            android:id="@+id/settings_sub"
            android:title="Settings">
            <menu>
                <item
                    android:id="@+id/settings"
                    android:icon="@drawable/ic_settings"
                    android:title="@string/settings" />
            </menu>
        </item>
    </group>
</menu>

I tried to add a borderline with this xml, but I can't set android:title invisible to make @+id/settings to the only visible item in @+id/settings.

How to get a simple borderline between two items like its shown in the gmail drawer above?

Tomblarom
  • 1,429
  • 1
  • 15
  • 38
  • 1
    see this question http://stackoverflow.com/questions/30790420/how-to-get-dividers-in-navigationview-menu-without-titles#30790420 – tyczj Jul 16 '15 at 19:22
  • @tyczj That was awsome! Thank you so so much! Search for hours ;) – Tomblarom Jul 16 '15 at 19:27

1 Answers1

0

To clear up:
Add this additional instead of only one <group />.

<group android:id="@+id/my_id">
    <!-- Divider will appear above this item -->
    <item ... />
</group>

Result: enter image description here

Source:
How to get dividers in NavigationView menu without titles?

Community
  • 1
  • 1
Tomblarom
  • 1,429
  • 1
  • 15
  • 38