Skip to content

Repository files navigation

Awesome

Screen-gifs

Important

For correct library working arrow should be see straight up like this ⬆

Import

Add it in your root build.gradle at the end of repositories:

	allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

And on module build.gradle

dependencies {
compile 'com.github.art2limit:Compass-View:1.0.3'
}

In your activity or fragment init CompassSensorManager and create CompassView like this:

privateCompassSensorManagercompassSensorManager;
@OverrideprotectedvoidonCreate(BundlesavedInstanceState) {
...
compassSensorManager = newCompassSensorManager(this);
CompassViewcompassView = newCompassView(this);
compassView.init(compassSensorManager, location1, location2, R.drawable.icon_arrow);
}
@OverrideprotectedvoidonResume() {
...
compassSensorManager.onResume();
}
@OverrideprotectedvoidonPause() {
...
compassSensorManager.onPause();
}

Don't forget call onResume and onPause, if you don't battery will be cry.

About

Android library. Arrow view shows from current location to desired

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages