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));  

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -