Open janoliver opened 9 years ago
Hi, you won't be able to access any variable or method in your fragment from a static inner class. I recommend you to keep your ViewHolder decoupled from the Fragment so it's reusable.
If you want to call a method in the fragment from the ViewHoder when something happens, you can achieve this via callback/listener. See this section.
Hi, I can't seem to figure out how to access a variable or function of the fragment containing my
ViewHolder
class.Since the constructor has to have a single
View
parameter, how can I access my fragment in my (static)ViewHolder
implementation?Thank you for the work!