projects/syncslides/app/src/main/java/io/v/android/apps/syncslides/NavigateFragment.java
/**
     * If the user is editing the text field and the text has changed, save the
     * notes locally and in Syncbase.
     */
If the user is editing the text field and the text has changed, save the
notes locally and in Syncbase.
If the user is editing the text field and the text has changed save the notes locally and in Syncbase .
public void saveNotes() {
        final String notes = mNotes.getText().toString();
        if (mEditing && (!notes.equals(mSlides.get(mUserSlideNum).getNotes()))) {
            toast("Saving notes");
            mSlides.get(mUserSlideNum).setNotes(notes);
            mDB.setSlideNotes(mDeckId, mUserSlideNum, notes);
        }
        mNotes.clearFocus();
        InputMethodManager inputManager =
                (InputMethodManager) getContext().
                        getSystemService(Context.INPUT_METHOD_SERVICE);
        if (getActivity().getCurrentFocus() != null) {
            inputManager.hideSoftInputFromWindow(
                    getActivity().getCurrentFocus().getWindowToken(),
                    InputMethodManager.HIDE_NOT_ALWAYS);
        }
        ((PresentationActivity) getActivity()).setUiImmersive(true);
    }
public void saveNotes ( ) { final String notes = mNotes . getText ( ) . toString ( ) ; if ( mEditing && ( ! notes . equals ( mSlides . get ( mUserSlideNum ) . getNotes ( ) ) ) ) { toast ( "Saving notes" ) ; mSlides . get ( mUserSlideNum ) . setNotes ( notes ) ; mDB . setSlideNotes ( mDeckId , mUserSlideNum , notes ) ; } mNotes . clearFocus ( ) ; InputMethodManager inputManager = ( InputMethodManager ) getContext ( ) . getSystemService ( Context . INPUT_METHOD_SERVICE ) ; if ( getActivity ( ) . getCurrentFocus ( ) != null ) { inputManager . hideSoftInputFromWindow ( getActivity ( ) . getCurrentFocus ( ) . getWindowToken ( ) , InputMethodManager . HIDE_NOT_ALWAYS ) ; } ( ( PresentationActivity ) getActivity ( ) ) . setUiImmersive ( true ) ; }
If the user is editing the text field and the text has changed, save the
 notes locally and in Syncbase.
If the user is editing the text field and the text has changed save the notes locally and in Syncbase .