java - draw polylines with different colors on v2 maps -
i drawing multiple polylines using loop on version 2 google map. setting color polyline using code.
mmap.addpolyline(new polylineoptions() .add(new latlng(lats, lons), new latlng(late,lone)) .width(5) .color(0xffff0000));
how increment rgb color dynamically each loop iteration.
random rnd = new random(); int color = color.argb(255, rnd.nextint(256), rnd.nextint(256), rnd.nextint(256)); --- loop ---- mmap.addpolyline(new polylineoptions() .add(new latlng(lats, lons), new latlng(late,lone)) .width(5) .color(color));