In Android RecyclerView How to change the color of Alternate rows
问题 I am new in android , recently I have learned recyclerview and i want to change the color of rows. Example: I have 10 rows and I want to change color like 5 rows blue and 5 rows red.Alternate rows color should be like this. From where I have to change this by Adapter or by MainActivity. Please help me 回答1: You can change the color of alternate row by adding the following code on your Adapter class. You can also change the images of your row by using this code. Put this code inside