i don't know actually sorry may i need to read more about Java Oriented 2010/5/27 Tommy <[email protected]>
> Have you added the activity to the manifest file? What errors are you > getting? > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of andrew > Sent: Wednesday, May 26, 2010 5:49 PM > To: Android Developers > Subject: [android-developers] startActivityForResult error > > Hi, > > I can't launch a new activity with startActivityForResult / > startActivity method. > Below is the code. Can anyone give my any tips and guidelines? thanks! > > /**************************/ > public class Sandbox extends Activity { > > private Button mHHW; > private static final int ACTIVITY_CREATE = 0; > > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > > > mHHW = (Button) findViewById(R.id.about_hhw); > > mHHW.setOnClickListener(new View.OnClickListener(){ > public void onClick(View v){ > createNote(); > } > }); > } > > private void createNote() { > Intent i = new Intent(this, PageTwo.class); > startActivity(i); > //startActivityForResult(i,ACTIVITY_CREATE); > } > } > > /**************************/ > > public class PageTwo extends Activity { > > private Button mGoBack; > > @Override > protected void onCreate(Bundle savedInstanceState) { > // TODO Auto-generated method stub > super.onCreate(savedInstanceState); > setContentView(R.layout.page_two); > > /* > mGoBack = (Button) findViewById(R.id.go_back); > > mGoBack.setOnClickListener(new View.OnClickListener(){ > public void onClick(View v){ > finish(); > } > }); > */ > > } > > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en

