Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

change color in recyclerview

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
        Resources res = holder.itemView.getContext().getResources();
        holder.object.setBackgroundColor(res.getColor(R.color.yor_color));
    }
 
PREVIOUS NEXT
Tagged: #change #color #recyclerview
ADD COMMENT
Topic
Name
4+5 =