private void editNote(int noteId){
  hideSoftKeyboard();
  Intent intent=new Intent(MainActivity.this,NoteActivity.class);
  intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
  intent.putExtra("id",String.valueOf(noteId));
  startActivity(intent);
}

private void editNote ( int noteId ) { hideSoftKeyboard ( ) ; Intent intent = new Intent ( MainActivity . this , NoteActivity . class ) ; intent . setFlags ( Intent . FLAG_ACTIVITY_CLEAR_TASK ) ; intent . putExtra ( "id" , String . valueOf ( noteId ) ) ; startActivity ( intent ) ; }
method used to enter note edition mode
