Android api 17 compat

This commit is contained in:
Leith Bade
2014-11-15 19:49:13 +11:00
parent 6f78ec8a70
commit 2404f6ca0e
3 changed files with 4 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ android {
defaultConfig {
applicationId "com.mapbox.mapboxgl.app"
minSdkVersion 18
minSdkVersion 17
targetSdkVersion 21
}

View File

@@ -6,7 +6,7 @@ android {
defaultConfig {
applicationId "com.mapbox.mapboxgl.lib"
minSdkVersion 18
minSdkVersion 17
targetSdkVersion 21
ndk {

View File

@@ -1116,7 +1116,8 @@ public class MapView extends SurfaceView {
// Mouse events
// TODO: SOURCE_TOUCH_NAVIGATION?
// TODO: source device resolution?
if (event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) {
//if (event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) { // this is not available before API 18
if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) == InputDevice.SOURCE_CLASS_POINTER) {
// Choose the action
switch (event.getActionMasked()) {
// Mouse scrolls