Skip to content

Instantly share code, notes, and snippets.

@pramonow
Created November 20, 2020 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramonow/196d69b10b7da04c3779094feaf44783 to your computer and use it in GitHub Desktop.
Save pramonow/196d69b10b7da04c3779094feaf44783 to your computer and use it in GitHub Desktop.
class DemoActivity : AppCompatActivity(), AdapterOnClick {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_demo)
//create our adapter here and passing in our class
var demoAdapter = DemoAdapter(this)
//other layout manager binding
}
//Function to be implemented for adapter click interface
override fun onClick(item:Any) {
//do things related to activity
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment