0

Is there any way to call ButterKnife.reset() in the ViewHolder of a RecyclerView? Normally it's called in onDestroyView() or onDetachedFromWindow(), but the ViewHolder doesn't necessarily have this.

I tried calling it from the individual ViewHolder in the adapter's onViewDetachedFromWindow() method, but because it recycles the views, it causes null pointer exceptions when it tries to access the view that was reset.

Mikey Chen
  • 2,370
  • 1
  • 19
  • 31
  • 2
    Possible duplicate of [Where should I unbind ButterKnife 8.x.x in a ViewHolder?](http://stackoverflow.com/questions/38015412/where-should-i-unbind-butterknife-8-x-x-in-a-viewholder) – piotrek1543 Aug 17 '16 at 23:18
  • why do you want to do is? what is your pupose? – piotrek1543 Aug 17 '16 at 23:18

0 Answers0