For me :two: has an advantage because of the `OnCl...
# android
a
For me 2️⃣ has an advantage because of the
OnClick
annotation and also the ability to use it in any class like a
ViewHolder
for example
a
with 1️⃣ onclick is as simple as:
Copy code
someButton.setOnClickListener {
    // do stuff
}
so arguably even easier than 2️⃣ ?
a
Separate method is better choice for me to not create a clutter on the
onCreate
method
Copy code
@OnClick(R.id.some_button) fun onSomeButtonClicked() {
   // do something
}
but more importantly having the ability to use it in any class like a
ViewHolder
is a huge advantage for me
👍 1