Create a NoteEdit class that extends android.app.Activity.
This is the first time we will have created an Activity without the Android Eclipse plugin doing it for us. When you do so, the onCreate() method is not automatically overridden for you. It is hard to imagine an Activity that doesn't override the onCreate() method, so this should be the first thing you do.
1. Right click on the com.android.demo.notepad2 package in the Package Explorer, and select New > Class from the popup menu.
2. Fill in NoteEdit for the Name: field in the dialog.
3. In the Superclass: field, enter android. app.Activity (you can also just type Activity and hit Ctrl-Space on Windows and Linux or Cmd-Space on the Mac, to invoke code assist and find the right package and class).
4. Click Finish.
5. In the resulting NoteEdit class, right click in the editor window and select Source > Override/Implement
Was this article helpful?