1// set on-click listener
2btn_click_me.setOnClickListener {
3 Toast.makeText(this, "You clicked me.", Toast.LENGTH_SHORT).show()
4}
1button.setOnClickListener(object : View.OnClickListener {
2 override fun onClick(v: View?) {
3 //your implementation goes here
4 }
5 })
6