How to put a line separating items from a menu?

2

Hello, does anyone know how I can put a horizontal line to separate the items from my menu without having to use the <group> tag? I have the following code:

<menu>

<item android:id="@+id/action_rate"
    android:title="@string/action_rate"
    android:orderInCategory="100"/>


<item android:id="@+id/action_comment"
    android:title="@string/action_comment"
    android:orderInCategory="100"/>

<item android:id="@+id/action_about"
    android:title="@string/action_about"
    android:orderInCategory="100"/>

</menu>
    
asked by anonymous 13.09.2015 / 17:03

2 answers

3

Try this between items:

<View
        android:layout_width="fill_parent"
        android:layout_height="1dp"
        android:background="@color/dark_gray2"
        android:focusable="false" />
    
13.09.2015 / 19:22
3

Alternatively you can also use the graphical prototyping tools from Android Studio, available in the design menu, or if you prefer, a framework like bootstrap is important and you can take the elements you want. there is a good library for this kind of thing, available at link

    
13.09.2015 / 20:56