X
X
xne712472015-02-10 21:35:14
Android
xne71247, 2015-02-10 21:35:14

Android app Icons are not displayed in the menu, why?

I ask for help from experienced android application developers. I'm trying to make a menu with icons, but it doesn't work - the icons are not displayed.

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/menu_bookmark"
        android:icon="@drawable/ic_launcher"
        android:title="Bookmark" />

    <item android:id="@+id/menu_save"
        android:icon="@drawable/oplata"
        android:title="Save" />

    <item android:id="@+id/menu_search"
        android:icon="@drawable/abc_btn_check_material"
        android:title="Search" />

    <item android:id="@+id/menu_share"
        android:icon="@drawable/ic_launcher"
        android:title="Share" />

    <item android:id="@+id/menu_delete"
        android:icon="@drawable/ic_launcher"
        android:title="Delete" />

    <item android:id="@+id/menu_preferences"
        android:icon="@drawable/ic_launcher"
        android:title="Preferences" />
</menu>

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        menu.add(0, 0, 0, "androidDemo").setIcon(R.drawable.ic_launcher);
        getMenuInflater().inflate(R.menu.newmenu, menu);

I click on the menu call and I do not see the icons. The lessons say that they should already be, help me figure it out.
e7ad0fef692e4952b61d09452d5cbfcb.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
anyd3v, 2015-02-10
@anyd3v

To start with Google and one of the first links
 

X
xne71247, 2015-02-11
@xne71247

i wanted icons in the menu where...nQSM0.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question