Reputation: 137
I'm a long time windows developer looking to learn something about Android programming. I'm working my way through the Sams book Teach Yourself Android Application Programming in 24 hours. I've discovered some flaws with the book already but nothing that I couldn't figure out on my own, until now. I'm working on adding a second class to my project and in the New Java Class dialog, it says to click the Browse button next to the Superclass box and pick "android.app.Activity". However, the only thing shown is java.lang.Object.
I'm pretty certain that I've set thing up correctly, but then, maybe I haven't.
Can anyone give me guidance?
Thanks!
Bo
Upvotes: 4
Views: 19779
Reputation: 48871
The browse button tries to do an auto-match based on what is currently in the Superclass text box.
Delete java.lang.Object and enter Act (for example) then click Browse and see what you get. ;-)
BTW - I'm assuming you're using Eclipse? If so, confirm and someone will retag the question as it's more of an Eclipse usage question rather than Android specific.
Upvotes: 3
Reputation: 398
After creating a class you can just extend it ..
Create a class and then manually add the part in bold
public class MyActivity extends android.app.Activity{
}
Upvotes: 1