Tuesday, April 10, 2012

Re: [android-developers] opening a new screen

Are you calling startEvents() anywhere?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, Apr 9, 2012 at 10:37 AM, H <skiolinist@gmail.com> wrote:
This might be something incredibly easy but i have no clue how to
accomplish this.

Right now i have code enough to make a simple main menu using standard
buttons and a button listener.  From what i can tell I have the code
that should open up a new activity but when i run it and click the
button nothing shows up.  Here is the code

 @Override
       public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
   }

   public void startEvents()
   {
       Button button3 = (Button) findViewById(R.id.button3);

       button3.setOnClickListener(new View.OnClickListener() {

           public void onClick(View arg0) {
               //Starting a new Intent
               Intent nextScreen = new
Intent(NACURH2013Activity.this, EventsActivity.class);
               startActivity(nextScreen);
           }
       });
   }

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

No comments:

Post a Comment