You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered: