The thing that always gets me is that I have not defined the second activity in the manifest.
Snapper -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mark Murphy Sent: Saturday, January 31, 2009 12:58 PM To: [email protected] Subject: [android-beginners] Re: how to move from one screen to another ? Ziv Tatian wrote: > > Hi all, > > I have two activities that i've created: a welcome screen with a > continue button on it, and a user details activity. > I want to go to the user details activity from my welcome activity > when i click on the continue button. > I've tried the following code but i get an error when i try to run it > on the emulator whenever i press the continue button. > here's the code: > > public class Welcome extends Activity { > /** Called when the activity is first created. */ > > @Override > public void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > Button continueButton = (Button) findViewById(R.id.go); > continueButton.setOnClickListener(new View.OnClickListener() { > > public void onClick(View view) { > Intent mIntent = new Intent(view.getContext > (),UserData.class); > startActivity(mIntent); > } > }); > } > > } > > can anyone help with that? What is the error as reported in the error log? (adb logcat, DDMS, or Eclipse to examine the log) -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

