Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Multi-Screen Application

How do you handle multiple screens in an android application? I have developed with the tab bar at the bottom without problem, however what I am wanting to do is replace all the content on the screen with the content from a new .xml layout file I have created in the project. Additionally, how would I tie the back end code to the new layout file? I'm sure this question probably exists already and is googleable (may have made up a new word). However, I don't know exactly what it is that I am looking for. Thanks in advance for your help.

like image 203
jay Avatar asked Apr 07 '11 16:04

jay


1 Answers

What you need to do is, create a new Activity and add it to the AndroidManifest.xml:

<activity android:name="ActivityClassName" android:label="Label for the Activity"></activity>

and can be called in a method:

public void startActivity() {
    Intent someName = new Intent(CurrentClass.this, ActivityClassName.class);
    startActivity(someName);
}
like image 197
Tommy Avatar answered Sep 25 '22 06:09

Tommy