Skip to content

forceporquillo/android-recyclerview-with-custom-interface-listener

Repository files navigation

RecyclerView with custom interface listener sample

A proper way to implement onClickListener in RecyclerView.

This gets rid of putting more boilerplate code into onBindViewHolder, which means this sample project only binds the logic of onClick listener inside ViewHolder. And it is, and always a better practice to attached listener inside ViewHolder instead of onBindViewHolder(), that is because onBindViewHolder() is called for each and every item and this is unnecessary option to repeat.

Don't Repeat Yourself.

I've explained this in detailed format as Stackoverflow answer. Check it here -> Want to link my listview with text in Android Studio

Releases

No releases published

Packages

No packages published

Languages