package com.example.chris.helloworld;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
public void buttonWasClicked(View button) {
Toast.makeText(this, "Button clicked!", Toast.LENGTH_SHORT).show();
}
}
}
//The buttonWasClicked is not red but greyed out in the editor, and the editor shows an error that buttonWasClicked has not been used before. I'm not sure why, I thought this was how I define a callback method.