Created
August 24, 2014 18:48
-
-
Save gskielian/c306080f8e76b6cfcfc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.a1_awesome_intents; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Button doStuffButton = (Button) findViewById(R.id.do_stuff_button); | |
//remember lowerCamelCase for buttons | |
doStuffButton.setOnClickListener(new View.OnClickListener() { | |
//here we send the user to the next activity | |
@Override | |
public void onClick(View view) { | |
//do stuff here | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment