Created
December 10, 2015 17:10
-
-
Save weverb2/319236a3b83c6c4499f5 to your computer and use it in GitHub Desktop.
Adapted from https://gist.github.com/AKiniyalocts/d866274ddb55bfabc4f4 to bind a specific model to a view holder.
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
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import butterknife.ButterKnife; | |
/** | |
* Created by brandon on 12/9/15. | |
*/ | |
public abstract class ButterKnifeViewHolder<T> extends RecyclerView.ViewHolder { | |
public ButterKnifeViewHolder(View itemView) { | |
super(itemView); | |
ButterKnife.bind(this, itemView); | |
} | |
public abstract void bindWithModel(@Nullable T model); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment