0

I made an activity and implemented toolbar with options menu. How to change design from optionsmenu ??

This is how it looks now and need to achieve.

MainActivity.class

setSupportActionBar(toolbar);
 toolbar.inflateMenu(R.menu.menu_toolbar);

Manifest.xml

 android:theme="@style/Theme.AppCompat.NoActionBar"

menu_toolbar.xml

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <item
        android:id="@+id/action_edit"
        android:title="@string/edit_menu"
        app:showAsAction="never" />
    <item
        android:id="@+id/action_notification_settings"
        android:title="@string/notification_settings"
        app:showAsAction="never" />
    <item
        android:id="@+id/action_about_engage"
        android:title="@string/about_engage"
        app:showAsAction="never" />

    <item
        android:id="@+id/action_contact"
        android:title="@string/contact_engage"
        app:showAsAction="never" />
</menu>
trulala
  • 23
  • 3

1 Answers1

0

You are using light theme and it shows dark menu. Use dark theme and it will show light menu.

from styles:

   <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" />

change the parent theme.

Aamir Ali
  • 203
  • 1
  • 8