I am developing an application in android which has a login Screen. Right now I am able to receive the response from the server successfully. After a successful response it should take me to the next activity or class where I display a new screen/activity. what should I do in order to achieve this.
+1
A:
In Android you are using Intents to change from one Activity to another. In this case you would use an explicit Intent. In code this would like this:
Intent goToNextActivity = new Intent(getApplicationContext(), YourNewClass.class);
startActivity(goToNextActivity);
Be sure to add YourNewClass to the manifest as another activity like this:
<activity android:name=".your.package.YourNewClass" />
Have a closer look at the documentation of Intent. You can also read the document about application fundamentals in the documentation it is somewhat to deep to just answer this question but it will give you insights in the most important concepts of android.
Janusz
2010-09-27 11:54:41
Thanks! I applied the above code and its working. I will also go through the docs.
Niamathsa
2010-09-27 12:45:39
@Niamathsa if my answer solved your problem you can accept it as the correct answer through clicking on the check mark left from the answer.
Janusz
2010-09-27 12:54:21