I\'m currently learning butterknife, and I need to bind specific @OnClicks on different views generated by my customer adapter. How do I go about with this?
I\'ve se
write this code in ViewHolder
class
static class ViewHolder {
public int getPosition;
@Nullable
@Bind(R.id.txt_title_name)
TextView txtTitle;
public ViewHolder(View view) {
ButterKnife.bind(this, view);
}
@OnClick(R.id.btn_download)
public void onCheck() {
Log.d("ViewHolder", "position ->" + getPosition);
}
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
holder.getPosition = position;
}