This library will help to show the polyline in dual color similar as Uber with animation in the demo.
- Pass the googlemap context and Latlng points stored in arraylist.
- MapAnimator.getInstance().animateRoute(googleMap, polyLineList);
polyLineList refers to the ArrayList, the coordinates which is to be decoded from the directions api of google. -
- Note:
- MapAnimator.getInstance().setPrimaryLineColor(color);
- MapAnimator.getInstance().setSecondaryLineColor(color);
You can change the color of the default polyline by passing :
If you are changing the default colors, call it before animateRoute() method call. - App Level: implementation 'com.github.tintinscorpion:Dual-color-Polyline-Animation:1.0'
- Project Level: maven { url 'https://jitpack.io' }