1

I have created the following top-level main Menu in the Android app:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".MainActivity">
        <group android:id="@+id/group_speed" android:checkableBehavior="single" >
            <item android:id="@+id/slow" android:title="@string/speed_slow"/>
            <item android:id="@+id/normal" android:title="@string/speed_normal"/>
            <item android:id="@+id/fast" android:title="@string/speed_fast" />
        </group>
        <group android:id="@+id/group_info" android:checkableBehavior="none">
            <item android:id="@+id/help" android:title="Help"/>
            <item android:id="@+id/about" android:title="About"/>
        </group>
</menu>

I would like to know if there is a simple way to add a Horizontal divider between two menu groups (and/or two menu items within the group) in a declarative way using just XML statement (optionally, adding shape resources, attributes, etc., but not using java code for this decorative task).

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Alexander Bell
  • 7,842
  • 3
  • 26
  • 42
  • Have you taken a look at [this](https://stackoverflow.com/questions/5049852/android-drawing-separator-divider-line-in-layout)? – Jules Dupont Dec 17 '17 at 00:01
  • @jdupont Yes, I did and it doesn't work. Btw, I asked to be specific and provide a complete proved-working solution rather than pointing to the numerous non-working ones spread all over. Thanks for the understanding. Best regards, – Alexander Bell Dec 17 '17 at 00:08

0 Answers0