This library will help to show the polyline in dual color similar as Uber.

Overview

Dual-color-Polyline-Animation

Android Arsenal BCH compliance Platform
This library will help to show the polyline in dual color similar as Uber with animation in the demo.

Demo



Steps:

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: You can change the color of the default polyline by passing :
MapAnimator.getInstance().setPrimaryLineColor(color);
MapAnimator.getInstance().setSecondaryLineColor(color);

If you are changing the default colors, call it before animateRoute() method call.

Dependency

App Level:
implementation 'com.github.tintinscorpion:Dual-color-Polyline-Animation:1.0'
Project Level:
maven { url 'https://jitpack.io' }



Developers

Pritam Dasgupta

License

MIT License Copyright (c) 2018 Pritam Dasgupta

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Route is not drawn

    Route is not drawn

    Screenshots https://drive.google.com/file/d/1X6tSj6KZSgPH2bPijRY8wKbZG_7iza5I/view?usp=sharing - Video Here

    Smartphone (please complete the following information):

    • Device: New Samsung: Galaxy S20, Galaxy A50 and more
    • OS: Android 11

    Additional context Route is not drawn only New Samsung. Emulator wor good.

    opened by lUjek-Sh 7
  • App Crasheing

    App Crasheing

    MapAnimator.getInstance().animateRoute(mMap, polylineList); generates this error in my emulator any help ?

    android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@57da9ab is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:679) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) at android.widget.Toast$TN.handleShow(Toast.java:467) at android.widget.Toast$TN$2.handleMessage(Toast.java:350) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6125) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)

    opened by delmeluck 2
  • Polyline path wasn't drawn

    Polyline path wasn't drawn

    I have passed decoded path to your Class. But no path or no animation was showing.

    But in general path is drawn by this below code.

    mMap.addPolyline( PolylineOptions() .addAll(decodedPath) )

    opened by shaon2016 2
  • Colors do not change.

    Colors do not change.

    Unable to change the color of line using the given method. Steps to reproduce the behavior:

    1. Add a route
    2. Draw Polyline
    3. Line is drawn and animated
    4. Try changing color. It just doesn't work. May be due to Singleton Pattern?
    opened by mujtaba617 1
  • Sample app is empty

    Sample app is empty

    Hi, I was excited to see you demo app. But when I try to install it in my phone, the sample app was empty. Could you please share the code of your sample app?

    Thanks

    opened by sreelalpm 1
  • I/Counters: exceeded sample count in FrameTime

    I/Counters: exceeded sample count in FrameTime

    Hi. When using the library, it constantly drops into the console:

    I/Counters: exceeded sample count in FrameTime
    I/Counters: exceeded sample count in FrameTime
    I/Counters: exceeded sample count in FrameTime
    I/Counters: exceeded sample count in FrameTime
    I/Counters: exceeded sample count in FrameTime
    I/Counters: exceeded sample count in FrameTime
    

    I do not know what it means. Maybe you know why this is happening. And you tell me, since I didn't find any information about this error on stackoverflow.

    opened by lUjek-Sh 3
  • get the example like demo

    get the example like demo

    Hi

    Thanks for you library, I need to ask favour from you can you able to share the Android UI which you have shown in the readme doc because I m not good at developing android UI applications so if you can share code with me that would be good help for me (Specially origin and destination picker and label on origin and destination )

    Thanks

    opened by saneera 0
Releases(1.2)
Owner
Pritam Dasgupta
Worked in every kind of projects including e-commerce app, cab booking app, implementation of RFID system in school Management apps,Fleet management system etc.
Pritam Dasgupta
Alligator is a modern Android navigation library that will help to organize your navigation code in clean and testable way.

Alligator Alligator is a modern Android navigation library that will help to organize your navigation code in clean and testable way. Features Any app

Artur Artikov 290 Dec 9, 2022
A lightweight library to help you navigate in compose with well typed functions.

TypedNavigation A lightweight library to help you navigate in compose with well typed functions. Installation: You can add this library to your projec

xmartlabs 23 Apr 7, 2022
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.

Bubble Navigation ?? A light-weight library to easily make beautiful Navigation Bars with a ton of ?? customization options. Demos FloatingTopBarActiv

Gaurav Kumar 1.7k Dec 31, 2022
An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

SlidingMenu (Play Store Demo) SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus li

Jeremy Feinstein 11.1k Dec 27, 2022
Android Library for making animated tutorials inside your app

##SlidingTutorial Cleveroad introduces Sliding Tutorial Library for Android Hey guys, hope you haven’t started developing a tutorial for your Android

Cleveroad 2.5k Dec 31, 2022
Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

Android ViewPagerIndicator Paging indicator widgets that are compatible with the ViewPager from the Android Support Library to improve discoverability

Jake Wharton 10.2k Dec 26, 2022
An efficient TabLayout library implemented with RecyclerView.

RecyclerTabLayout An efficient TabLayout library implemented with RecyclerView. Features Efficient when having many tabs Easy setup with ViewPager (sa

Shinichi Nishimura 1.3k Dec 9, 2022
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

MaterialDrawer ... the flexible, easy to use, all in one drawer library for your Android project. What's included ?? • Setup ??️ • Migration Guide ??

Mike Penz 11.6k Dec 27, 2022
An Android library for managing multiple stacks of fragments

FragNav Android library for managing multiple stacks of fragments (e.g., Bottom Navigation , Navigation Drawer). This library does NOT include the UI

Nic Capdevila 1.5k Jan 6, 2023
A flexible, easy to use, unique drawer library for your Android project.

Duo Navigation Drawer This Android library provides an easy way to create an alternative navigation drawer for android. Instead of a drawer that slide

PSD 1.1k Dec 21, 2022
A sleek, out of the box, easy to understand and use, swipe gesture based Navigational Library for android.

Facilis Swipe gesture based navigational library for Android. Watch Demo Video: Getting Started To get this project into your build: Gradle Add it in

Prem Suman 35 Feb 15, 2022
Memory efficient android library for managing individual fragment backstack.

fragstack : Android library for managing individual fragment backstack. An Easy to use library for managing individual fragment back stack as Instagra

Abhishesh 21 Feb 6, 2021
🛸Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Adriel Café 831 Dec 26, 2022
A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

Kaustubh Patange 88 Dec 11, 2022
A simple navigation library for Android 🗺️

Enro ??️ A simple navigation library for Android "The novices’ eyes followed the wriggling path up from the well as it swept a great meandering arc ar

Isaac Udy 216 Dec 16, 2022
[ACTIVE] Simple Stack, a backstack library / navigation framework for simpler navigation and state management (for fragments, views, or whatevers).

Simple Stack Why do I want this? To make navigation to another screen as simple as backstack.goTo(SomeScreen()), and going back as simple as backstack

Gabor Varadi 1.3k Jan 2, 2023
A library that you can use for bottom navigation bar. Written with Jetpack Compose

FancyBottomNavigationBar A library that you can use for bottom navigation bar. W

Alperen Çevlik 3 Jul 27, 2022
AndroidBriefActions - Android library for sending and observing non persistent actions such as showing a message; nice readable way to call navigation actions from ViewModel or Activity/Fragment.

implementation "com.vladmarkovic.briefactions:briefactions:$briefActionsVersion" Benefits Why use brief-actions library pattern: Prevent short-term ac

null 2 Dec 22, 2022
A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

Vitali Olshevski 290 Dec 29, 2022