Hi!

I'm facing exactly the same problem. Have you found a solution for it
yet?

Regards,
   Ender

On 30 Mrz., 19:30, Peli <[EMAIL PROTECTED]> wrote:
> I want to include an alternative menu item, similar as is done in the
> NotesList sample, but I want to add anicon. What would be the
> appropriate place to specify theicon?
>
> I'm adding the alternative menu through the following code:
>
> Intent intent = new Intent(null, mListUri);
>         intent.addCategory(Intent.ALTERNATIVE_CATEGORY);
>         menu.addIntentOptions(
>                 Menu.ALTERNATIVE, 0,
>                 new ComponentName(this, ShoppingView.class),
>                 null, intent, 0, null);
>
> which displays correctly the menu item that is specified here:
>
> <activity android:name=".shopping.ListShareSettingsActivity"
>         android:label="@string/share_settings"                
> android:theme="@android:style/
> Theme.Dialog"              android:icon="@drawable/contact_share001a">
>              <intent-filter android:label="@string/share"
>                 android:icon="@drawable/contact_share001a">
>                 <action
> android:name="org.openintents.action.SET_SHARE_SETTINGS" />
>                 <category
> android:name="android.intent.category.DEFAULT" />
>                 <category
> android:name="android.intent.category.ALTERNATIVE" />
>                 <category
> android:name="android.intent.category.SELECTED_ALTERNATIVE" />
>                 <data android:mimeType="vnd.android.cursor.item/
> vnd.openintents.shopping.list" />
>             </intent-filter>
>         </activity>
>
> It shows the string as specified in @string/share, but I don't get to
> see theiconspecified in @drawable/contact_share001a.
>
> Since the notepad example does not display menu icons, it is difficult
> to tell whether this feature should work in principle in m5 or not.
>
> Peli
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to