在文档中,
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
);