Code example for Menu

Methods: add

0
    private static final int ERASE_MENU_ID = Menu.FIRST + 3;
    private static final int SRCATOP_MENU_ID = Menu.FIRST + 4;
 
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
 
        menu.add(0, COLOR_MENU_ID, 0, "Color").setShortcut('3', 'c');
        menu.add(0, EMBOSS_MENU_ID, 0, "Emboss").setShortcut('4', 's');
        menu.add(0, BLUR_MENU_ID, 0, "Blur").setShortcut('5', 'z');
        menu.add(0, ERASE_MENU_ID, 0, "Erase").setShortcut('5', 'z');
        menu.add(0, SRCATOP_MENU_ID, 0, "SrcATop").setShortcut('5', 'z');
 
        /****   Is this the mechanism to extend with filter effects? 
        Intent intent = new Intent(null, getIntent().getData()); 
        intent.addCategory(Intent.CATEGORY_ALTERNATIVE); 
        menu.addIntentOptions( 
                              Menu.ALTERNATIVE, 0, 
                              new ComponentName(this, NotesList.class), 
                              null, intent, 0, null); 
        *****/