Defining your actions in XML makes your code that much cleaner

This is a nice hack when developing apps in Android (similar to JavaFX) - define the on click events in XML:

In the Activity, we can specify the method:

This is much cleaner than: