Answer the question
In order to leave comments, you need to log in
How to change padding and margin values of menu items?
Can you please tell me how to change the distances (padding and margin) of the elements in the menu? I need to reduce them. standard distances are too big for the application.
I create the menu like this:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item android:id="@+id/menu_contents"
android:title="@string/menu_contents"
android:icon="@drawable/ic_format_list_numbered"
android:orderInCategory="2"
app:showAsAction="always" />
<item android:id="@+id/menu_search"
android:title="@string/menu_search"
android:icon="@drawable/ic_search"
android:orderInCategory="100"
app:showAsAction="always" />
<item android:id="@+id/menu_favorite"
android:title="@string/menu_favorite"
android:orderInCategory="100"
app:showAsAction="never" />
<item android:id="@+id/menu_settings"
android:title="@string/menu_settings"
android:orderInCategory="100"
app:showAsAction="never" />
</menu>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question