This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android] Release android-v5.1.0-beta.2 (#8976)
* [android] url getter on sources * [android] fix ui test filter in makefile * [android] - build SNAPSHOT from release branch (#8958) * [android] - update changelog for 5.1.0-beta.2 * [android] - bump version number * [android] - Camera change listener v2.0 * [core] allow filesource url transform reset * [android] Update attribution wordmark (#8774) * Update wordmark on android * Moved attribution i icon to the right of mapbox word (in mapview preview image) * update padding and margin * [android] update hardcoded branch name * revert version to 5.1.0-SNAPSHOT
- Loading branch information
Showing
33 changed files
with
468 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...id/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/CameraChangeDispatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.mapbox.mapboxsdk.maps; | ||
|
||
import static com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraIdleListener; | ||
import static com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraMoveCanceledListener; | ||
import static com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraMoveStartedListener; | ||
import static com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraMoveListener; | ||
|
||
class CameraChangeDispatcher implements MapboxMap.OnCameraMoveStartedListener, MapboxMap.OnCameraMoveListener, | ||
MapboxMap.OnCameraMoveCanceledListener, OnCameraIdleListener { | ||
|
||
private boolean idle = true; | ||
|
||
private OnCameraMoveStartedListener onCameraMoveStartedListener; | ||
private OnCameraMoveCanceledListener onCameraMoveCanceledListener; | ||
private OnCameraMoveListener onCameraMoveListener; | ||
private OnCameraIdleListener onCameraIdleListener; | ||
|
||
void setOnCameraMoveStartedListener(OnCameraMoveStartedListener onCameraMoveStartedListener) { | ||
this.onCameraMoveStartedListener = onCameraMoveStartedListener; | ||
} | ||
|
||
void setOnCameraMoveCanceledListener(OnCameraMoveCanceledListener onCameraMoveCanceledListener) { | ||
this.onCameraMoveCanceledListener = onCameraMoveCanceledListener; | ||
} | ||
|
||
void setOnCameraMoveListener(OnCameraMoveListener onCameraMoveListener) { | ||
this.onCameraMoveListener = onCameraMoveListener; | ||
} | ||
|
||
void setOnCameraIdleListener(OnCameraIdleListener onCameraIdleListener) { | ||
this.onCameraIdleListener = onCameraIdleListener; | ||
} | ||
|
||
@Override | ||
public void onCameraMoveStarted(int reason) { | ||
if (!idle) { | ||
return; | ||
} | ||
|
||
idle = false; | ||
if (onCameraMoveStartedListener != null) { | ||
onCameraMoveStartedListener.onCameraMoveStarted(reason); | ||
} | ||
} | ||
|
||
@Override | ||
public void onCameraMove() { | ||
if (onCameraMoveListener != null && !idle) { | ||
onCameraMoveListener.onCameraMove(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onCameraMoveCanceled() { | ||
if (onCameraMoveCanceledListener != null && !idle) { | ||
onCameraMoveCanceledListener.onCameraMoveCanceled(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onCameraIdle() { | ||
if (onCameraIdleListener != null && !idle) { | ||
idle = true; | ||
onCameraIdleListener.onCameraIdle(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.