0
Handling button click by calling a function(Kotlin, Android Studio)
How do i do this?
5 Answers
+ 1
Thank you!
+ 1
i think that you need to build your function outside, and call the function in the override method(onClick). i am using pure java, i dont realy know much about kotlin but i hope that was helpfull...
+ 1
oh okay thanks!
0
I already knew that though , I wanted to call a function when the button is clicked. Any ideas ?
what I did:
btn.setOnclickListener { functionname()}