Reputation: 439
i am new to android development and i am confused about activities (not even sure if they are called activities lol) how would i go about starting another activity from within one?
public void work(View v) {
//does quite a bit of stuff in here
//then goes back to csend() to check if this needs to be repeated
}
public void csend(View view) {
if (i < x){
//does a little bit of stuff here
work(); //i need to make this run the other code
}
}
also, what does the (View view) mean, could someone give me a link to a tutorial explaining the different parts to android code?
thanks Edit: thanks for the quick response, i'll go read up on everything
Upvotes: 0
Views: 89
Reputation: 12134
You can also use,
startActivity(new Intent(YourClassName.this, SecondActivity.class));
Upvotes: 0
Reputation: 15973
Intent showContent = new Intent(this, ActivityName.class);
startActivity(showContent);
http://www.androidcompetencycenter.com/2009/03/tutorial-how-to-start-a-new-activity/
Upvotes: 3