MiniumApps/launcher3/src/main/java/co/siempo/phone/activities/NoteListActivity.java
/**
     * Item clicked in Toolbar menu callback method
     *
     * @param menuItem Item clicked
     * @return true if click detected and logic finished, false otherwise
     */
Item clicked in Toolbar menu callback method
@param menuItem Item clicked
@return true if click detected and logic finished, false otherwise
Item clicked in Toolbar menu callback method @param menuItem Item clicked @return true if click detected and logic finished false otherwise
@Override
    public boolean onMenuItemClick(MenuItem menuItem) {
        int id = menuItem.getItemId();
        if (id == R.id.action_backup) {
            backupCheckDialog.show();
            return true;
        }
        if (id == R.id.action_restore) {
            restoreCheckDialog.show();
            return true;
        }
        if (id == R.id.action_evernote) {
            if (EvernoteSession.getInstance().isLoggedIn()) {
                new EvernoteManager().sync();
            } else {
                EvernoteSession.getInstance().authenticate(this);
            }
            return true;
        }
        /*
        // 'Rate app' pressed -> create new dialog to ask the user if he wants to go to the PlayStore
        // If yes -> start PlayStore and go to app link < If Exception thrown, open in Browser >
        if (id == R.id.action_rate_app) {
            final String appPackageName = getPackageName();
            new AlertDialog.Builder(this)
                    .setTitle(R.string.title_rateApp)
                    .setMessage(R.string.msg_rate)
                    .setPositiveButton(R.string.label_yes, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            try {
                                startActivity(new Intent(Intent.ACTION_VIEW,
                                        Uri.parse("market://details?id=" + appPackageName)));
                            } catch (android.content.ActivityNotFoundException e) {
                            CoreApplication.getInstance().logException(e);
                                startActivity(new Intent(Intent.ACTION_VIEW,
                                        Uri.parse("http://play.google.com/store/apps/details?id="
                                                + appPackageName)));
                            }
                        }
                    })
                    .setNegativeButton(R.string.label_no, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    })
                    .show();
            return true;
        }*/
        return false;
    }
@ Override public boolean onMenuItemClick ( MenuItem menuItem ) { int id = menuItem . getItemId ( ) ; if ( id == R . id . action_backup ) { backupCheckDialog . show ( ) ; return true ; } if ( id == R . id . action_restore ) { restoreCheckDialog . show ( ) ; return true ; } if ( id == R . id . action_evernote ) { if ( EvernoteSession . getInstance ( ) . isLoggedIn ( ) ) { new EvernoteManager ( ) . sync ( ) ; } else { EvernoteSession . getInstance ( ) . authenticate ( this ) ; } return true ; } /*
        // 'Rate app' pressed -> create new dialog to ask the user if he wants to go to the PlayStore
        // If yes -> start PlayStore and go to app link < If Exception thrown, open in Browser >
        if (id == R.id.action_rate_app) {
            final String appPackageName = getPackageName();

            new AlertDialog.Builder(this)
                    .setTitle(R.string.title_rateApp)
                    .setMessage(R.string.msg_rate)
                    .setPositiveButton(R.string.label_yes, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            try {
                                startActivity(new Intent(Intent.ACTION_VIEW,
                                        Uri.parse("market://details?id=" + appPackageName)));

                            } catch (android.content.ActivityNotFoundException e) {
                            CoreApplication.getInstance().logException(e);
                                startActivity(new Intent(Intent.ACTION_VIEW,
                                        Uri.parse("http://play.google.com/store/apps/details?id="
                                                + appPackageName)));
                            }
                        }
                    })
                    .setNegativeButton(R.string.label_no, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    })
                    .show();

            return true;
        }*/ return false ; }
Item clicked in Toolbar menu callback method
 @param menuItem Item clicked
 @return true if click detected and logic finished, false otherwise
Item clicked in Toolbar menu callback method @param menuItem Item clicked @return true if click detected and logic finished false otherwise
// 'Backup notes' pressed -> show backupCheckDialog // 'Restore notes' pressed -> show restoreCheckDialog