Multiple click listeners on buttons
问题 I want to know how to add multiple click events to buttons defined in XML, as previously, in Java, we implemented View.onClickListener interface and did the rest of the work in onClick method. Example: @Override public void onClick(View v) { switch (v.getId()) { case R.id.oneButton: // do your code break; case R.id.twoButton: // do your code break; case R.id.threeButton: // do your code break; default: break; } } I'm making a basic calculator app with the new Kotlin but it seems Kotlin has no