Created
April 23, 2018 13:46
-
-
Save Temidtech/4a482ebe7b2f93ae7176fbf74e55232c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jAVA code to set Onclick event to a button | |
button.setOnClickListener(new View.OnClickListener(){ | |
@Override | |
public void onClick(View v){ | |
doSomething(); | |
} | |
}); | |
//Kotlin gets it done in 1 line.. | |
button.setOnClickListener { doSomething() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment