You've handled this attribute completely in wrong way. See how it was done for View onClick attribute in android sources here http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.2_r1/android/view/View.java#3789
Method that shows toast have to be declared in MainActivity class like you've for regular buttons in previous labs.