android dev: how to implement for add method in menu interface?

Posted by wsgjj on Stack Overflow See other posts from Stack Overflow or by wsgjj
Published on 2010-05-19T01:47:42Z Indexed on 2010/05/19 1:50 UTC
Read the original article Hit count: 181

Filed under:

who knows about the method "add" in menu interface? how to implement exactly? which is it's imlementation class? i couldn't find detail implementation in source code of sdk. i want to check how to implement in android source code for "add" method.

e.g.

public boolean onCreateOptionsMenu(Menu menu) {
    menu.***add***(0, MENU_NEW_GAME, 0, "New Game");
    menu.add(0, MENU_QUIT, 0, "Quit");
    return true;
}

thanks in advance!

© Stack Overflow or respective owner

Related posts about android