1 Name.setOnClickListener(new View.OnClickListener() {
2 @Override
3 public void onClick(View view) {
4 startActivity(new Intent(MainActivity.this,FileName.class));
5 }
6 });
1Button myButton;
2awesomeButton = new Button(this);
3awesomeButton.setOnClickListener(new View.OnClickListener() {
4 @Override
5 public void onClick(View v) {
6 startActivity(new Intent(MainActivity.this,NewActivity.class));
7 });
8}