app/src/main/java/com/moonpi/swiftnotes/EditActivity.java
/**
     * Create an Intent with title, body, colour, font size and hideBody extras
     * Set RESULT_OK and go back to MainActivity
     */
Create an Intent with title, body, colour, font size and hideBody extras
Set RESULT_OK and go back to MainActivity
Create an Intent with title body colour font size and hideBody extras Set RESULT_OK and go back to MainActivity
protected void saveChanges() {
        Intent intent = new Intent();
        intent.putExtra(NOTE_TITLE, titleEdit.getText().toString());
        intent.putExtra(NOTE_BODY, bodyEdit.getText().toString());
        intent.putExtra(NOTE_COLOUR, colour);
        intent.putExtra(NOTE_FONT_SIZE, fontSize);
        intent.putExtra(NOTE_HIDE_BODY, hideBody);
        setResult(RESULT_OK, intent);
        imm.hideSoftInputFromWindow(titleEdit.getWindowToken(), 0);
        finish();
        overridePendingTransition(0, 0);
    }
protected void saveChanges ( ) { Intent intent = new Intent ( ) ; intent . putExtra ( NOTE_TITLE , titleEdit . getText ( ) . toString ( ) ) ; intent . putExtra ( NOTE_BODY , bodyEdit . getText ( ) . toString ( ) ) ; intent . putExtra ( NOTE_COLOUR , colour ) ; intent . putExtra ( NOTE_FONT_SIZE , fontSize ) ; intent . putExtra ( NOTE_HIDE_BODY , hideBody ) ; setResult ( RESULT_OK , intent ) ; imm . hideSoftInputFromWindow ( titleEdit . getWindowToken ( ) , 0 ) ; finish ( ) ; overridePendingTransition ( 0 , 0 ) ; }
Create an Intent with title, body, colour, font size and hideBody extras
 Set RESULT_OK and go back to MainActivity
Create an Intent with title body colour font size and hideBody extras Set RESULT_OK and go back to MainActivity
// Package everything and send back to activity with OK