Step 9

Now pull out the previous handling code from the onActivityResult() method in the Notepadv3 class.

All of the note retrieval and updating now happens within the NoteEdit life cycle, so all the onActivityResult() method needs to do is update its view of the data, no other work is necessary. The resulting method should look like this:

@Override protected void onActivityResult(int requestCode, int resultCode,

Intent intent) { super.onActivityResult(requestCode, resultCode, intent); fillData();

Because the other class now does the work, all this has to do is refresh the data.

0 0

Post a comment