How can I use getResources inside of onBindViewHolder()?
i can't use getResources inside onBindViewHolder()?
yes, you can. Use
viewHolder.itemView.getResources();
getResources()
is part View. No need to pass Context
around
public void onBindViewHolder(ViewHolder viewHolder, int i) {
Resources res = viewHolder.itemView.getContext().getResources();
...
}