From 63efa9bf7d7df678b6061eea722ead20f8328b02 Mon Sep 17 00:00:00 2001
From: Tobrun
- *
* Sets the current Mapbox access token used to load map styles and tiles. + *
** You must set a valid access token before you call {@link MapView#onCreate(Bundle)} * or an exception will be thrown. diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index 26f13ed353..5cae6e70bb 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -1908,7 +1908,6 @@ public class MapboxMap { /** * Called when an MarkerView is removed from the MapView or the View object is going to be reused. *
- *
* This method should be used to reset an animated view back to it's original state for view reuse. *
*@@ -1990,8 +1989,9 @@ public class MapboxMap { /** * Interface definition for a callback to be invoked when the user clicks on a MarkerView. - * - * @see MarkerViewManager#setOnMarkerViewClickListener(OnMarkerViewClickListener) + *
+ * {@link MarkerViewManager#setOnMarkerViewClickListener(OnMarkerViewClickListener)} + * */ public interface OnMarkerViewClickListener { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java index 0fd6b1390d..42609b8265 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java @@ -124,11 +124,11 @@ public class MapboxMapOptions implements Parcelable { } /** - * Creates a GoogleMapsOptions from the attribute set + * Creates a MapboxMapsOptions from the attribute set.s * * @param context Context related to a map view. * @param attrs Attributeset containing configuration - * @return + * @return the MapboxMapOptions created from attributes */ public static MapboxMapOptions createFromAttributes(@NonNull Context context, @Nullable AttributeSet attrs) { MapboxMapOptions mapboxMapOptions = new MapboxMapOptions(); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java index 4ce631fc3e..a06f449309 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java @@ -8,8 +8,6 @@ import android.support.annotation.UiThread; import android.view.Gravity; import android.view.View; -import com.mapbox.mapboxsdk.maps.widgets.MyLocationViewSettings; - /** * Settings for the user interface of a MapboxMap. To obtain this interface, call getUiSettings(). */ @@ -492,7 +490,7 @@ public class UiSettings { /** * Gets whether the markers are automatically deselected (and therefore, their infowindows * closed) when a map tap is detected. - + * * @return If true, markers are deselected on a map tap. */ public boolean isDeselectMarkersOnTap() { @@ -503,7 +501,7 @@ public class UiSettings { * Sets whether the markers are automatically deselected (and therefore, their infowindows * closed) when a map tap is detected. * - * @param deselectMarkersOnTap + * @param deselectMarkersOnTap determines if markers should be deslected on tap */ public void setDeselectMarkersOnTap(boolean deselectMarkersOnTap) { this.deselectMarkersOnTap = deselectMarkersOnTap; @@ -580,7 +578,7 @@ public class UiSettings { /** * Returns the gesture focal point * - * @return The focal point + * @return The focal point */ public PointF getFocalPoint() { return focalPoint; diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java index 7b41184a5a..80d5ff7db0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java @@ -55,16 +55,16 @@ public class OfflineManager { */ public interface ListOfflineRegionsCallback { /** - * Receives the list of offline regions + * Receives the list of offline regions. * - * @param offlineRegions + * @param offlineRegions the offline region array */ void onList(OfflineRegion[] offlineRegions); /** - * Receives the error message + * Receives the error message. * - * @param error + * @param error the error message */ void onError(String error); } @@ -75,16 +75,16 @@ public class OfflineManager { */ public interface CreateOfflineRegionCallback { /** - * Receives the newly created offline region + * Receives the newly created offline region. * - * @param offlineRegion + * @param offlineRegion the offline region to create */ void onCreate(OfflineRegion offlineRegion); /** - * Receives the error message + * Receives the error message. * - * @param error + * @param error the error message to be shown */ void onError(String error); } @@ -149,6 +149,8 @@ public class OfflineManager { ** Code from https://developer.android.com/guide/topics/data/data-storage.html#filesExternal *
+ * + * @return true if external storage is readable */ public static boolean isExternalStorageReadable() { String state = Environment.getExternalStorageState(); @@ -193,7 +195,7 @@ public class OfflineManager { /** * Access token getter/setter * - * @param accessToken + * @param accessToken the accessToken to be used by the offline manager. * @deprecated As of release 4.1.0, replaced by {@link MapboxAccountManager#start(Context, String)} ()} */ @Deprecated @@ -226,6 +228,8 @@ public class OfflineManager { * The query will be executed asynchronously and the results passed to the given * callback on the main thread. * + * + * @param callback the callback to be invoked */ public void listOfflineRegions(@NonNull final ListOfflineRegionsCallback callback) { listOfflineRegions(mDefaultFileSourcePtr, new ListOfflineRegionsCallback() { @@ -262,6 +266,10 @@ public class OfflineManager { * downloading resources, call `OfflineRegion.setDownloadState(DownloadState.STATE_ACTIVE)`, * optionally registering an `OfflineRegionObserver` beforehand. * + * + * @param definition the offline region definition + * @param metadata the metadata in bytes + * @param callback the callback to be invoked */ public void createOfflineRegion( @NonNull OfflineRegionDefinition definition, diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java index 3756c93df2..22cb034f08 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java @@ -55,8 +55,11 @@ public class OfflineRegion { * Implement this method to be notified of a change in the status of an * offline region. Status changes include any change in state of the members * of OfflineRegionStatus. - * + ** This method will be executed on the main thread. + *
+ * + * @param status the changed status */ void onStatusChanged(OfflineRegionStatus status); @@ -65,8 +68,11 @@ public class OfflineRegion { * regional resources. Such errors may be recoverable; for example the implementation * will attempt to re-request failed resources based on an exponential backoff * algorithm, or when it detects that network access has been restored. - * + ** This method will be executed on the main thread. + *
+ * + * @param error the offline region error message */ void onError(OfflineRegionError error); @@ -93,14 +99,14 @@ public class OfflineRegion { /** * Receives the status * - * @param status + * @param status the offline region status */ void onStatus(OfflineRegionStatus status); /** * Receives the error message * - * @param error + * @param error the error message */ void onError(String error); } @@ -118,7 +124,7 @@ public class OfflineRegion { /** * Receives the error message * - * @param error + * @param error the error message */ void onError(String error); } @@ -127,15 +133,17 @@ public class OfflineRegion { * A region is either inactive (not downloading, but previously-downloaded * resources are available for use), or active (resources are being downloaded * or will be downloaded, if necessary, when network access is available). - * + ** This state is independent of whether or not the complete set of resources * is currently available for offline use. To check if that is the case, use * `OfflineRegionStatus.isComplete()`. + *
*/ @IntDef({STATE_INACTIVE, STATE_ACTIVE}) @Retention(RetentionPolicy.SOURCE) - public @interface DownloadState {} + public @interface DownloadState { + } public static final int STATE_INACTIVE = 0; public static final int STATE_ACTIVE = 1; @@ -148,6 +156,8 @@ public class OfflineRegion { /** * Gets whether or not the `OfflineRegionObserver` will continue to deliver messages even if * the region state has been set as STATE_INACTIVE. + * + * @return true if delivering inactive messages */ public boolean isDeliveringInactiveMessages() { return deliverInactiveMessages; @@ -157,6 +167,8 @@ public class OfflineRegion { * When set true, the `OfflineRegionObserver` will continue to deliver messages even if * the region state has been set as STATE_INACTIVE (operations happen asynchronously). If set * false, the client won't be notified of further messages. + * + * @param deliverInactiveMessages true if it should deliver inactive messages */ public void setDeliverInactiveMessages(boolean deliverInactiveMessages) { this.deliverInactiveMessages = deliverInactiveMessages; @@ -203,6 +215,8 @@ public class OfflineRegion { /** * Register an observer to be notified when the state of the region changes. + * + * @param observer the observer to be notified */ public void setObserver(@NonNull final OfflineRegionObserver observer) { setOfflineRegionObserver(new OfflineRegionObserver() { @@ -246,6 +260,8 @@ public class OfflineRegion { /** * Pause or resume downloading of regional resources. + * + * @param state the download state */ public void setDownloadState(@DownloadState int state) { this.state = state; @@ -256,6 +272,8 @@ public class OfflineRegion { * Retrieve the current status of the region. The query will be executed * asynchronously and the results passed to the given callback which will be * executed on the main thread. + * + * @param callback the callback to invoked. */ public void getStatus(@NonNull final OfflineRegionStatusCallback callback) { getOfflineRegionStatus(new OfflineRegionStatusCallback() { @@ -284,14 +302,19 @@ public class OfflineRegion { /** * Remove an offline region from the database and perform any resources evictions * necessary as a result. - * + ** Eviction works by removing the least-recently requested resources not also required * by other regions, until the database shrinks below a certain size. - * + *
+ ** When the operation is complete or encounters an error, the given callback will be * executed on the main thread. - * + *
+ ** After you call this method, you may not call any additional methods on this object. + *
+ * + * @param callback the callback to be invoked */ public void delete(@NonNull final OfflineRegionDeleteCallback callback) { deleteOfflineRegion(new OfflineRegionDeleteCallback() { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java index 1a1aa48065..4d4a924dab 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java @@ -12,14 +12,20 @@ import android.support.annotation.ColorInt; public class PropertyFactory { /** - * Set visibility + * Set the property visibility. + * + * @param value the visibility value + * @return property wrapper around visibility */ public static Property