Header Ads

test

How we show recyclerview item in random color in android


How we  show recyclerview item in random color in android




 Paste this code in Your Adapter class in OnBindHolder()



Random rnd = new Random();
int currentColor = Color.argb(255, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
holder.my.setBackgroundColor(currentColor);


No comments