Answer the question
In order to leave comments, you need to log in
How to access RecyclerView's ViewHolder to call its draw method?
There is an adapter private class MyAdapter extends RecyclerView.Adapter
and private class ItemHolder extends RecyclerView.ViewHolder
Rendering is done in updateHolder when called in ItemHolder bindItem
public void bindItem(ItemClass item) {
mItem = item;
updateHolder();
}
@Override
public void onBindViewHolder(ItemHolder holder, int position) {
holder.bindItem(mItems.get(position));
}
Answer the question
In order to leave comments, you need to log in
UpdateHolder() uses some external value, depending on which mItem.field1 or mItem.field2 is displayed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question