tags:

views:

124

answers:

1

Hi,

How can i launch an android activity via a specified class name of an activity?

Thank you.

+5  A: 

From your base Activity (say, via an option menu click):

public boolean onOptionsItemSelected(MenuItem item)
{
Intent intent = new Intent (this, NewActivity.class);
startActivityForResult (intent, SOME_ACTIVITY_ID);
}

Hope that helps!

Nate
Don't forget to add the activity class name to the manifest file.
Whaledawg