-1

I'm new with android and kotlin, so sorry if it's a too basic question but I don't see the difference between this

        findViewById<Button>(R.id.done_button).setOnClickListener { changeNickname() }

and thisdone_button.setOnClickListener { changeNickname() }

ADM
  • 20,406
  • 11
  • 52
  • 83
  • I am surprised to see the question had been closed without and answer apparently noone knows whats going on – nikoss Jul 24 '20 at 22:35

1 Answers1

0

if you will use done_button more one time it will be to much writing each time add this

findViewById<Button>(R.id.done_button)

in general your code have to be smallest and readable please read more about the clean code .