unpix
unpix

Reputation: 853

Problems with android icons in Menu

I have this menu.xml

<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/refresh" android:title="Actualizar" android:icon="@android:drawable/ic_menu_refresh"></item>
<item android:title="Sair" android:id="@+id/exit" android:icon="@android:drawable/ic_menu_close_clear_cancel"></item></menu>

and i'm getting this error:

Error: Resource is not public. (at 'icon' with value '@android:drawable/ic_menu_refresh').

Why the resource is not public? I have this icon in other apps and worked.

Upvotes: 2

Views: 6512

Answers (1)

Pete Houston
Pete Houston

Reputation: 15079

Maybe it's protected. In some API level, some icons are allowed to use, some are not. You can try ic_menu_home ic_menu_preferences ic_menu_help

Some links to refer:

http://groups.google.com/group/android-developers/browse_thread/thread/dabbe62aa1b54c13

android: resource not found

Upvotes: 2

Related Questions