public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); Bundle bundle = getIntent().getExtras(); this.noteIndex = bundle.getInt("noteIndex"); NoteDB.loadNotes(); this.currentNote = NoteDB.getList().get(this.noteIndex); initLayout(); initListeners(); if (savedInstanceState != null) { this.noteText.setText(savedInstanceState.getString(EditNote.savedText)); } }