In my opinion, the definition of implementation and the definition is OnClickListenermuch better. The main reason is that it’s easier for others to understand how the code works.
When you read the application code for Android, you will read .java files (90% of the time) to understand how this works; You’ll ignore most XML layouts that don’t tell you how the application really works or what its purpose is.
, android:onClick, ( ) : XML- Java, , .
, ; , .