Answer the question
In order to leave comments, you need to log in
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);
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