P72B / PolylineAnimator

Android google maps polyline animator library
MIT License
24 stars 5 forks source link

2-dual polyline #3

Closed KaSakee closed 3 years ago

KaSakee commented 3 years ago

Hey, Thank you for wasting time doing this great library!, I really hope if you would add dual-color animation to the polyline like uber, Like Black, and Grey, or if you can give us the ability to choose the colors.

P72B commented 3 years ago

Hi, can you provide a screen shoot or gif of the uber animation?

Styling of the AnimatedPolyline is already possible with: animatedPolyline = AnimatedPolyline(googleMap, wayPoints, polylineOptions = getPolylineOptions()) The polylineOptions are from Google Play Service As an example: PolylineOptions().color(ContextCompat.getColor(this, R.color.colorPrimary)).pattern(listOf(Dot(), Gap(20F)))

Does this would solve your issue? Otherwise I could extend the library functionallity.

KaSakee commented 3 years ago

I managed to make it, By Creating 2 polylines one under and another one above, Black on the down and transparent gray on the up, and animate the gray line on the end listener above the black one, And it will be like shimmering or something. I hope this is helpful

KaSakee commented 3 years ago

I want to mention this gif https://i.stack.imgur.com/HSoZd.gif

And you can see when the animation reach the end it fades and starts again above the static black line

Thank you so much for real this is so nice of you

P72B commented 3 years ago

Nice to hear that you made it. Thank you for the feedback and enjoy the lib. In any case feel free to approach me again.