In Iphone i am able to pass selector id like this way
CCMenuItemSprite* item =[CCMenuItemSprite itemFromNormalSprite:normalSprite
selectedSprite:selectedSprite target:target selector:@selector(LaunchLevel:)];
and the selected menuItem tag is obtained by
- (void ) LaunchLevel: (id) sender
{
// Do Something
CCMenuItemSprite *temp = (CCMenuItemSprite *)sender;
}
My question is how to do the similar code in android? Means how to pass the id of the MenuItem
You cannot do this for the moment. If you check the code source there is nothing for this purpose. But as cocos2d is open source, nothing prevents you to implement this feature.