@Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { Resources res = holder.itemView.getContext().getResources(); holder.object.setBackgroundColor(res.getColor(R.color.yor_color)); }