MiniumApps/launcher3/src/main/java/co/siempo/phone/activities/NotesEditActivity.java
/**
     * Item clicked in Toolbar menu callback method
     *
     * @param item Item clicked
     * @return true if click detected and logic finished, false otherwise
     */
Item clicked in Toolbar menu callback method
@param item Item clicked
@return true if click detected and logic finished, false otherwise
Item clicked in Toolbar menu callback method @param item Item clicked @return true if click detected and logic finished false otherwise
@Override
    public boolean onMenuItemClick(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.action_note_colour) {
            colorPickerDialog.show(getFragmentManager(), "colourPicker");
            return true;
        }
        if (id == R.id.action_font_size) {
            fontDialog.show();
            return true;
        }
        if (id == R.id.action_hide_show_body) {
            if (!hideBody) {
                hideBody = true;
                menuHideBody.setTitle(R.string.label_showNoteBody);
                Toast toast = Toast.makeText(getApplicationContext(),
                        getResources().getString(R.string.msg_noteWillBeHidden),
                        Toast.LENGTH_SHORT);
                toast.show();
            }
            else {
                hideBody = false;
                menuHideBody.setTitle(R.string.label_hideNoteBody);
                Toast toast = Toast.makeText(getApplicationContext(),
                        getResources().getString(R.string.msg_noteWillBeShown),
                        Toast.LENGTH_SHORT);
                toast.show();
            }
            return true;
        }
        return false;
    }
@ Override public boolean onMenuItemClick ( MenuItem item ) { int id = item . getItemId ( ) ; if ( id == R . id . action_note_colour ) { colorPickerDialog . show ( getFragmentManager ( ) , "colourPicker" ) ; return true ; } if ( id == R . id . action_font_size ) { fontDialog . show ( ) ; return true ; } if ( id == R . id . action_hide_show_body ) { if ( ! hideBody ) { hideBody = true ; menuHideBody . setTitle ( R . string . label_showNoteBody ) ; Toast toast = Toast . makeText ( getApplicationContext ( ) , getResources ( ) . getString ( R . string . msg_noteWillBeHidden ) , Toast . LENGTH_SHORT ) ; toast . show ( ) ; } else { hideBody = false ; menuHideBody . setTitle ( R . string . label_hideNoteBody ) ; Toast toast = Toast . makeText ( getApplicationContext ( ) , getResources ( ) . getString ( R . string . msg_noteWillBeShown ) , Toast . LENGTH_SHORT ) ; toast . show ( ) ; } return true ; } return false ; }
Item clicked in Toolbar menu callback method
 @param item Item clicked
 @return true if click detected and logic finished, false otherwise
Item clicked in Toolbar menu callback method @param item Item clicked @return true if click detected and logic finished false otherwise
// Note colour menu item clicked -> show colour picker dialog // Font size menu item clicked -> show font picker dialog // If 'Hide note body in list' or 'Show note body in list' clicked // If hideBody false -> set to true and change menu item text to 'Show note body in list' // Toast note body will be hidden // If hideBody true -> set to false and change menu item text to 'Hide note body in list' // Toast note body will be shown