Creating your first working page with Java!

ProgramThat;

Following on from the first page of our app. We are now going to make some of the features work!

1. Go to MyActivity in the src folder.

2. The first thing you need to look at is that it extends activity. 

You are saying to java you want to use some of the predefined methods in this class one of which is onCreate. 

In every Java file you are most likely going to have an onCreate method, therefore they always have to extend Activity.

Only Java classes should be extended. 

3. You should also implement an onClickListener. In doing so you are saying to Java that there is going to some form of button on this page.

To do so it should look like this:

implements View.OnClickListener Image

Dont worry about if it comes up red this is because you haven’t added in the method yet.

4. Just bellow the…

View original post 315 more words

Advertisements

About Anuroop D

Very enthusiastic about technology and likes to share my knowledge through blogging. Has Bachelor's in Information Technology and currently pursuing my Master's in Computer Science.
This entry was posted in Android Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s