ドキュメントでは、
addIntentOptions (int groupId, int itemId, int order, ComponentName caller,
Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems)
を受け取る必要がありますgroupId
が、以下のコードでMenu.CATEGORY_ALTERNATIVE
は groupId として を持っていますが、これはどういう意味ですか?? 何をしCATEGORY_ALTERNATIVE
ますか?
menu.addIntentOptions(
Menu.CATEGORY_ALTERNATIVE, // Add the Intents as options in the alternatives group.
Menu.NONE, // A unique item ID is not required.
Menu.NONE, // The alternatives don't need to be in order.
null, // The caller's name is not excluded from the group.
specifics, // These specific options must appear first.
intent, // These Intent objects map to the options in specifics.
Menu.NONE, // No flags are required.
items // The menu items generated from the specifics-to-
// Intents mapping
);