summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java69
1 files changed, 4 insertions, 65 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
index f202d6267d..10dfff8694 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
@@ -82,37 +82,25 @@ public class LocationComponentOptions implements Parcelable {
private float accuracyAlpha;
private int accuracyColor;
private int backgroundDrawableStale;
- @Nullable
private String backgroundStaleName;
private int foregroundDrawableStale;
- @Nullable
private String foregroundStaleName;
private int gpsDrawable;
- @Nullable
private String gpsName;
private int foregroundDrawable;
- @Nullable
private String foregroundName;
private int backgroundDrawable;
- @Nullable
private String backgroundName;
private int bearingDrawable;
- @Nullable
private String bearingName;
- @Nullable
private Integer bearingTintColor;
- @Nullable
private Integer foregroundTintColor;
- @Nullable
private Integer backgroundTintColor;
- @Nullable
private Integer foregroundStaleTintColor;
- @Nullable
private Integer backgroundStaleTintColor;
private float elevation;
private boolean enableStaleState;
private long staleStateTimeout;
- @Nullable
private int[] padding;
private double maxZoom;
private double minZoom;
@@ -147,7 +135,7 @@ public class LocationComponentOptions implements Parcelable {
float elevation,
boolean enableStaleState,
long staleStateTimeout,
- @Nullable int[] padding,
+ int[] padding,
double maxZoom,
double minZoom,
float maxZoomIconScale,
@@ -204,7 +192,6 @@ public class LocationComponentOptions implements Parcelable {
* @return a new {@link LocationComponentOptions} object with the settings you defined in your style
* resource
*/
- @Nullable
public static LocationComponentOptions createFromAttributes(@NonNull Context context,
@StyleRes int styleRes) {
@@ -329,7 +316,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @return the builder which contains the values defined in this current instance as defaults.
*/
- @NonNull
public Builder toBuilder() {
return new Builder(this);
}
@@ -342,8 +328,7 @@ public class LocationComponentOptions implements Parcelable {
* @param context your activities context used to acquire the style resource
* @return the builder which contains the default values defined by the style resource
*/
- @NonNull
- public static Builder builder(@NonNull Context context) {
+ public static Builder builder(Context context) {
return LocationComponentOptions.createFromAttributes(context,
R.style.mapbox_LocationComponent).toBuilder();
}
@@ -641,7 +626,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @return integer array of padding values
*/
- @Nullable
@SuppressWarnings("mutable")
public int[] padding() {
return padding;
@@ -739,7 +723,6 @@ public class LocationComponentOptions implements Parcelable {
return trackingAnimationDurationMultiplier;
}
- @NonNull
@Override
public String toString() {
return "LocationComponentOptions{"
@@ -949,7 +932,7 @@ public class LocationComponentOptions implements Parcelable {
};
@Override
- public void writeToParcel(@NonNull Parcel dest, int flags) {
+ public void writeToParcel(Parcel dest, int flags) {
dest.writeFloat(accuracyAlpha());
dest.writeInt(accuracyColor());
dest.writeInt(backgroundDrawableStale());
@@ -1072,37 +1055,25 @@ public class LocationComponentOptions implements Parcelable {
private Float accuracyAlpha;
private Integer accuracyColor;
private Integer backgroundDrawableStale;
- @Nullable
private String backgroundStaleName;
private Integer foregroundDrawableStale;
- @Nullable
private String foregroundStaleName;
private Integer gpsDrawable;
- @Nullable
private String gpsName;
private Integer foregroundDrawable;
- @Nullable
private String foregroundName;
private Integer backgroundDrawable;
- @Nullable
private String backgroundName;
private Integer bearingDrawable;
- @Nullable
private String bearingName;
- @Nullable
private Integer bearingTintColor;
- @Nullable
private Integer foregroundTintColor;
- @Nullable
private Integer backgroundTintColor;
- @Nullable
private Integer foregroundStaleTintColor;
- @Nullable
private Integer backgroundStaleTintColor;
private Float elevation;
private Boolean enableStaleState;
private Long staleStateTimeout;
- @Nullable
private int[] padding;
private Double maxZoom;
private Double minZoom;
@@ -1160,7 +1131,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_accuracyAlpha
*/
- @NonNull
public LocationComponentOptions.Builder accuracyAlpha(float accuracyAlpha) {
this.accuracyAlpha = accuracyAlpha;
return this;
@@ -1173,7 +1143,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_accuracyColor
*/
- @NonNull
public LocationComponentOptions.Builder accuracyColor(int accuracyColor) {
this.accuracyColor = accuracyColor;
return this;
@@ -1186,7 +1155,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_backgroundDrawableStale
*/
- @NonNull
public LocationComponentOptions.Builder backgroundDrawableStale(int backgroundDrawableStale) {
this.backgroundDrawableStale = backgroundDrawableStale;
return this;
@@ -1204,7 +1172,6 @@ public class LocationComponentOptions implements Parcelable {
* @param backgroundStaleName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder backgroundStaleName(@Nullable String backgroundStaleName) {
this.backgroundStaleName = backgroundStaleName;
return this;
@@ -1217,7 +1184,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_foregroundDrawableStale
*/
- @NonNull
public LocationComponentOptions.Builder foregroundDrawableStale(int foregroundDrawableStale) {
this.foregroundDrawableStale = foregroundDrawableStale;
return this;
@@ -1235,7 +1201,6 @@ public class LocationComponentOptions implements Parcelable {
* @param foregroundStaleName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder foregroundStaleName(@Nullable String foregroundStaleName) {
this.foregroundStaleName = foregroundStaleName;
return this;
@@ -1248,7 +1213,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_gpsDrawable
*/
- @NonNull
public LocationComponentOptions.Builder gpsDrawable(int gpsDrawable) {
this.gpsDrawable = gpsDrawable;
return this;
@@ -1266,7 +1230,6 @@ public class LocationComponentOptions implements Parcelable {
* @param gpsName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder gpsName(@Nullable String gpsName) {
this.gpsName = gpsName;
return this;
@@ -1279,7 +1242,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_foregroundDrawable
*/
- @NonNull
public LocationComponentOptions.Builder foregroundDrawable(int foregroundDrawable) {
this.foregroundDrawable = foregroundDrawable;
return this;
@@ -1297,7 +1259,6 @@ public class LocationComponentOptions implements Parcelable {
* @param foregroundName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder foregroundName(@Nullable String foregroundName) {
this.foregroundName = foregroundName;
return this;
@@ -1310,7 +1271,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_backgroundDrawable
*/
- @NonNull
public LocationComponentOptions.Builder backgroundDrawable(int backgroundDrawable) {
this.backgroundDrawable = backgroundDrawable;
return this;
@@ -1328,7 +1288,6 @@ public class LocationComponentOptions implements Parcelable {
* @param backgroundName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder backgroundName(@Nullable String backgroundName) {
this.backgroundName = backgroundName;
return this;
@@ -1341,7 +1300,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_bearingDrawable
*/
- @NonNull
public LocationComponentOptions.Builder bearingDrawable(int bearingDrawable) {
this.bearingDrawable = bearingDrawable;
return this;
@@ -1359,7 +1317,6 @@ public class LocationComponentOptions implements Parcelable {
* @param bearingName String icon or maki-icon name
* @return this builder for chaining options together
*/
- @NonNull
public LocationComponentOptions.Builder bearingName(@Nullable String bearingName) {
this.bearingName = bearingName;
return this;
@@ -1372,7 +1329,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_bearingTintColor
*/
- @NonNull
public LocationComponentOptions.Builder bearingTintColor(@Nullable Integer bearingTintColor) {
this.bearingTintColor = bearingTintColor;
return this;
@@ -1385,7 +1341,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_foregroundTintColor
*/
- @NonNull
public LocationComponentOptions.Builder foregroundTintColor(@Nullable Integer foregroundTintColor) {
this.foregroundTintColor = foregroundTintColor;
return this;
@@ -1398,7 +1353,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_backgroundTintColor
*/
- @NonNull
public LocationComponentOptions.Builder backgroundTintColor(@Nullable Integer backgroundTintColor) {
this.backgroundTintColor = backgroundTintColor;
return this;
@@ -1411,7 +1365,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_foregroundStaleTintColor
*/
- @NonNull
public LocationComponentOptions.Builder foregroundStaleTintColor(@Nullable Integer foregroundStaleTintColor) {
this.foregroundStaleTintColor = foregroundStaleTintColor;
return this;
@@ -1424,7 +1377,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_backgroundStaleTintColor
*/
- @NonNull
public LocationComponentOptions.Builder backgroundStaleTintColor(@Nullable Integer backgroundStaleTintColor) {
this.backgroundStaleTintColor = backgroundStaleTintColor;
return this;
@@ -1437,7 +1389,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_elevation
*/
- @NonNull
public LocationComponentOptions.Builder elevation(float elevation) {
this.elevation = elevation;
return this;
@@ -1451,7 +1402,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_enableStaleState
*/
- @NonNull
public LocationComponentOptions.Builder enableStaleState(boolean enabled) {
this.enableStaleState = enabled;
return this;
@@ -1467,7 +1417,6 @@ public class LocationComponentOptions implements Parcelable {
* @return this builder for chaining options together
* @attr ref R.styleable#LocationComponent_staleStateTimeout
*/
- @NonNull
public LocationComponentOptions.Builder staleStateTimeout(long timeout) {
this.staleStateTimeout = timeout;
return this;
@@ -1487,8 +1436,7 @@ public class LocationComponentOptions implements Parcelable {
*
* @param padding The margins for the map in pixels (left, top, right, bottom).
*/
- @NonNull
- public LocationComponentOptions.Builder padding(@Nullable int[] padding) {
+ public LocationComponentOptions.Builder padding(int[] padding) {
if (padding == null) {
throw new NullPointerException("Null padding");
}
@@ -1503,7 +1451,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param maxZoom The new maximum zoom level.
*/
- @NonNull
public LocationComponentOptions.Builder maxZoom(double maxZoom) {
this.maxZoom = maxZoom;
return this;
@@ -1514,7 +1461,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param minZoom The new minimum zoom level.
*/
- @NonNull
public LocationComponentOptions.Builder minZoom(double minZoom) {
this.minZoom = minZoom;
return this;
@@ -1529,7 +1475,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param maxZoomIconScale icon scale factor
*/
- @NonNull
public LocationComponentOptions.Builder maxZoomIconScale(float maxZoomIconScale) {
this.maxZoomIconScale = maxZoomIconScale;
return this;
@@ -1544,7 +1489,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param minZoomIconScale icon scale factor
*/
- @NonNull
public LocationComponentOptions.Builder minZoomIconScale(float minZoomIconScale) {
this.minZoomIconScale = minZoomIconScale;
return this;
@@ -1564,7 +1508,6 @@ public class LocationComponentOptions implements Parcelable {
* @see Builder#trackingInitialMoveThreshold(float)
* @see Builder#trackingMultiFingerMoveThreshold(float)
*/
- @NonNull
public LocationComponentOptions.Builder trackingGesturesManagement(boolean trackingGesturesManagement) {
this.trackingGesturesManagement = trackingGesturesManagement;
return this;
@@ -1575,7 +1518,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param moveThreshold the minimum movement
*/
- @NonNull
public LocationComponentOptions.Builder trackingInitialMoveThreshold(float moveThreshold) {
this.trackingInitialMoveThreshold = moveThreshold;
return this;
@@ -1587,7 +1529,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param moveThreshold the minimum movement
*/
- @NonNull
public LocationComponentOptions.Builder trackingMultiFingerMoveThreshold(float moveThreshold) {
this.trackingMultiFingerMoveThreshold = moveThreshold;
return this;
@@ -1598,7 +1539,6 @@ public class LocationComponentOptions implements Parcelable {
*
* @param layerBelow the id to set the location component below to.
*/
- @NonNull
public LocationComponentOptions.Builder layerBelow(String layerBelow) {
this.layerBelow = layerBelow;
return this;
@@ -1610,7 +1550,6 @@ public class LocationComponentOptions implements Parcelable {
* @param trackingAnimationDurationMultiplier the tracking animation duration multiplier
* @since 0.9.0
*/
- @NonNull
public LocationComponentOptions.Builder trackingAnimationDurationMultiplier(
float trackingAnimationDurationMultiplier) {
this.trackingAnimationDurationMultiplier = trackingAnimationDurationMultiplier;