Skip to content Skip to sidebar Skip to footer

How To Navigate To Another Page In Android?

I'm new to android. Please tell me how to navigate to a new page in android. Thanks in advance. Edit:How to start a new activity from an existing activity

Solution 1:

In android to navigate to another page means you have to start another activity. for starting a new activity use this

Intent intent = newIntent(currentActivity.this, nextActivity.class);
startActivity(intent);

You should mention the next activity in the AndroidManifest file.

Solution 2:

To change your page (i think you're refering to "Activities" in android you need to issue a so called "intent").

You cann do that by:

startActivity(newIntent(nextactivity,NextActivity.class));

or

startActivityForResult(newIntent(nextactivity,NextActivity.class),1);

if you want the new Activity to return any result to the activity who started the new one.

But what i recommend is, that you read this documentation here:

http://developer.android.com/guide/topics/intents/intents-filters.html

and come back to this question if you have need additional assistance on concrete problems on that topics.

i hope that helps.

Post a Comment for "How To Navigate To Another Page In Android?"