Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic layout/navigation question for android development

What is the best approach for navigating between "windows" in an android app?

I say "windows" because I dont the proper terminology in java. I just started.

Lets say the first screen the user sees is a username and password input with a button. On successful login, it shows a whole new "window" with relevant logged in information?

I attempted putting 2 EditTexts and a Button inside a view (using the Main.xml graphical layout tab[eclipse]) in main.xml, but it did not like that.

like image 533
Ronnie Avatar asked Mar 11 '26 13:03

Ronnie


1 Answers

This is a excerpt from the page http://developer.android.com/guide/topics/fundamentals.html

Activities An activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture.

Here's an tutorial on how to switch between activities: http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/

Don't for get to add every activity to AndroidManifest.xml!

like image 148
YoYoMyo Avatar answered Mar 13 '26 02:03

YoYoMyo