The Mapbox Gestures for Android library wraps GestureDetectorCompat and introduces implementation of scale, rotate, move, shove and tap gesture detectors.
Mapbox Gestures for Android was inspired by Android Gesture Detector Framework and offers the same functionality with some additional features on top.
The library is implemented in the projects found below, where you can head for more examples:
- The Mapbox Maps SDK for Android
- This library's sample app included in this repository
Are you using the library in your project as well? Let us know or create a PR, we'll be more than happy to add it to the list!
You'll find all of this library's documentation on our Maps Guides user interaction page. This includes information on installation, using the API, and links to the API reference.
If you are looking to include Mapbox Gestures for Android inside of your project, please take a look at the detailed instructions found in our docs. If you are interested in building from source, read the contributing guide inside of this project.
To use the Gestures library, you need to set the SDK registry (own Mapbox Maven repo) first. Please follow the instructions provided at the general Maps install page.
Then add the Mapbox Android Gestures library :
// In the app build.gradle file
dependencies {
implementation 'com.mapbox.mapboxsdk:mapbox-android-gestures:0.8.0'
}
To build test application you need to configure Mapbox access tokens as described at https://docs.mapbox.com/android/maps/guides/install/#configure-credentials.
To build the project you need to specify SDK_REGISTRY_TOKEN as an environmental variable or a gradle property. It is a secret token used to access the SDK Registry (Mapbox Maven instance) during compile time, with a scope set to DOWNLOADS:READ
.
To run the specific Mapbox activity in this repo's test application, you need to include public token in the [app/src/main/res/values/developer-config.xml] resource file.
- Need help with your code?: Look for previous questions on the #mapbox tag — or ask a new question.
- Have a bug to report? Open an issue. If possible, include the version of Mapbox Core that you're using, a full log, and a project that shows the issue.
- Have a feature request? Open an issue. Tell us what the feature should do and why you want the feature.
This repo's test app can also help you get started with the Gestures library.
We welcome feedback, translations, and code contributions! Please see CONTRIBUTING.md for details.
Noting here, that 0.x
versions series of Mapbox Gestures for Android
is still in an experimental phase. Breaking changes can occur with every iteration.