Advertisemnet

Earn Extra Money At Home. Starting from Now!!!

Tuesday, March 27, 2012

Android Chapter 3 : Calling Another Activity

Hello everyone, welcome back. This is Android Chapter 3 : Calling Another Activity.
I'm Mihiran Rupasinghe. Today we'll see how to call an activity from another activty. That means how you can move from one screen to another.

To do that you have to create an object from "Intent" class. When you create the object you have to give caller and who is going to called. In my main screen, when I press the start button I want to go to Log In page. To do that, first I have to write the code for button click. In my main activity java file, I'm going to write like this.


"btnStart" is the id of START button. SolutionDudeActivity is the caller and Login is the activity which is going to called. Now you should be able to go to Login Page when you press the START button.

See you in the next chapter.

No comments:

Post a Comment