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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to