Hey David,

Looks like there's no way in 1.0 to have addIntentOptions set the icon on
each created menu item.  I just fixed this, so in the next release it will
work.

As an interim solution, you could, in your onCreateOptionsMenu, go through
each menu item and do:

Intent intent = item.getIntent();
if (intent != null) item.setIcon(packageManager.getActivityIcon(intent));

jason

On Sun, Nov 2, 2008 at 7:41 AM, David Given <[EMAIL PROTECTED]> wrote:

> My application extensively uses menus constructed from activities
> declared in the manifest, using Menu.addIntentOptions() to get the
> system to automatically merge in any appropriate menu items based on the
> current activities' URL. This is working very well.
>
> Unfortunately, I haven't figured out how to make icons appear for the
> menu items. The label is correctly taken from android:label on the
> activity's <intent-filter>, or the activity's own label if one isn't
> specified, but android:icon appears to be completely ignored.
>
> Hunting for info, I found the following mailing list thread:
>
>
> http://groups.google.com/group/android-developers/browse_thread/thread/5ca8bc78fdaa9e69
>
> ...of people running into the same problem with m5. Unfortunately, there
> wasn't a resolution.
>
> Has anyone got this working? If so, how?
>
> --
> ┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
> │
> │ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽"⊂M),(V⊝"M),(V,⌽V)⌽"(V,V←1⎺1)⊝"⊂M)'
> │ --- Conway's Game Of Life, in one line of APL
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to