java - Calling activity method in custom adapter class -
so trying refresh recyclerview in activity problem doesn't casting or way calling it.
any ideas?
from crashlog, appear passing applicationcontext recyclerview. instead, need pass activity context, , ensure activity implements userrview interface.
a cleaner way pass context , pass userrview adapter, not have cast context userrview, , can continue pass application context if prefer.
edit: replace code
adapter = new customradapter(list, getbasecontext()); with
adapter = new customradapter(list, this);
Comments
Post a Comment