Bagz wrote: > I have covered > the layout basics from the Android site but was wondering what is the > standard way of switching between views/screens?
That depends a bit on what you mean by "screens". :-) > For example lets say i have a Welcome screen which simply says welcome > and has a button to click which takes you to a login page. Would you > create a welcome.xml layout and login.xml layout and create 2 activity > classes (one for each) and when the "Go to login" button is pressed > would you create a new instance of the login activity class (which of > course has an onCreate method to load the new screen)? That certainly can work, though you do not "create a new instance of the login activity class" directly. Instead, you need to call startActivity() in your first activity, telling it to start the second activity. For example, supposing your second activity is LoginActivity, you could call: startActivity(new Intent(this, LoginActivity.class)); from your initial activity to start up the LoginActivity. > If anyone knows of any good tutorials to follow that would be great! The Notepad tutorial on the Android site shows several activities and linking between them via startActivity() and kin. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---