public void onDeleteAction() { // both list and editor should be notified NotesListFragment list = (NotesListFragment) getFragmentManager().findFragmentById(R.id.noteslistfragment); NotesEditorFragment editor = (NotesEditorFragment) getFragmentManager().findFragmentById(R.id.editor_container); if (editor != null) editor.setSelfAction(); // delete note if (list != null) list.onDelete(); }