Last active
October 5, 2017 18:53
-
-
Save theerasan/0ddc23286515283c4454363045f78453 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ViewExtension | |
fun View.setOnAnimateClickListener(onClick: (View) -> Unit) { | |
this.setOnAnimateClickListener(null, onClick) | |
} | |
// MainActivity | |
val applyButton = findViewById(R.id.applyButton) | |
applyButton.setOnAnimateClickListener({view -> | |
Toast.makeText(this, "Clicked Apply " + view.id , Toast.LENGTH_SHORT).show() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment