Austin Dizzy
Austin Dizzy

Reputation: 115

Eclipse not recognizing Android supplied drawable?

In my app, I've got a menu which pops up when the user hits the "Menu" physical button. It's going mighty-fine except for the fact that Eclipse isn't recognizing one of the drawables that is built into the Android.jar package. If you look and see, "ic_menu_refresh" is built into the supplied Android.jar when you create an Android Project. I'm using the following code to use the particular icon:

android:icon="@android:drawable/ic_menu_refresh"

Eclipse gives me an error stating the following:

error: Error: Resource is not public. (at 'icon' with value '@android:drawable/ic_menu_refresh').   
menu.xml    
/Yeousch/res/layout line 3  
Android AAPT Problem

I can clearly see the resource but Eclipse seems to ignore it. Any solutions?

Upvotes: 0

Views: 2176

Answers (1)

E-Riz
E-Riz

Reputation: 32895

The compile error is informing you the resource you want is not public, not for applications to use. According to http://developer.android.com/guide/practices/ui_guidelines/icon_design_menu.html#examples9 applications should provide their own copies of these drawable resources.

Upvotes: 2

Related Questions