summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-05-22 11:50:44 +0200
committerTobrun <tobrun@mapbox.com>2018-05-22 17:25:18 +0200
commitcce72e2d36c5efe53bb026a0d98f835d16440ffa (patch)
tree2126c78ea4c823be922bbe7cc2ceea9a808f13f9
parent23a9d3b62362905b926405f74d6932f420666d2f (diff)
downloadqtlocation-mapboxgl-cce72e2d36c5efe53bb026a0d98f835d16440ffa.tar.gz
[android] - change MapView#initialize modifier to allow subclasses to override this method to provide alternate configurations to MapboxMapOptions
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index 23fb3c22dd..0f19965224 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -98,28 +98,30 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
@UiThread
public MapView(@NonNull Context context) {
super(context);
- initialise(context, MapboxMapOptions.createFromAttributes(context, null));
+ initialize(context, MapboxMapOptions.createFromAttributes(context, null));
}
@UiThread
public MapView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
- initialise(context, MapboxMapOptions.createFromAttributes(context, attrs));
+ initialize(context, MapboxMapOptions.createFromAttributes(context, attrs));
}
@UiThread
public MapView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
- initialise(context, MapboxMapOptions.createFromAttributes(context, attrs));
+ initialize(context, MapboxMapOptions.createFromAttributes(context, attrs));
}
@UiThread
public MapView(@NonNull Context context, @Nullable MapboxMapOptions options) {
super(context);
- initialise(context, options == null ? MapboxMapOptions.createFromAttributes(context, null) : options);
+ initialize(context, options == null ? MapboxMapOptions.createFromAttributes(context, null) : options);
}
- private void initialise(@NonNull final Context context, @NonNull final MapboxMapOptions options) {
+ @CallSuper
+ @UiThread
+ protected void initialize(@NonNull final Context context, @NonNull final MapboxMapOptions options) {
if (isInEditMode()) {
// in IDE layout editor, just return
return;