Skip to content

Instantly share code, notes, and snippets.

@theerasan
Created October 5, 2017 18:42
Show Gist options
  • Save theerasan/6bce7811a44f06e1c2d6cbe4a2144bd9 to your computer and use it in GitHub Desktop.
Save theerasan/6bce7811a44f06e1c2d6cbe4a2144bd9 to your computer and use it in GitHub Desktop.
private fun initCardViewWithKotlinExtensionWay() {
val cardView2 = findViewById(R.id.card_view2) as CardView
cardView2.setOnAnimateClickListener(R.id.imageBackground2, { view ->
Toast.makeText(this, "Clicked " + view.id , Toast.LENGTH_SHORT).show()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment