[android] - fix code generation, remove lamda, fixup color conversion locale
This commit is contained in:
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* The background color or pattern of the map.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A filled circle.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* An extruded (3D) polygon.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A filled polygon with an optional stroked border.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A stroked line.
|
||||
*
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.support.annotation.ColorInt;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
|
||||
@@ -1536,7 +1535,6 @@ public class PropertyFactory {
|
||||
return new PaintPropertyValue<>("fill-extrusion-opacity", expression);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.
|
||||
*
|
||||
@@ -3365,6 +3363,7 @@ public class PropertyFactory {
|
||||
return new LayoutPropertyValue<>("text-optional", value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
|
||||
*
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* Raster map textures such as satellite imagery.
|
||||
*
|
||||
@@ -245,24 +250,6 @@ public class RasterLayer extends Layer {
|
||||
return (PropertyValue<Float>) new PropertyValue("raster-fade-duration", nativeGetRasterFadeDuration());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RasterFadeDuration property transition options
|
||||
*
|
||||
* @return transition options for Float
|
||||
*/
|
||||
public TransitionOptions getRasterFadeDurationTransition() {
|
||||
return nativeGetRasterFadeDurationTransition();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the RasterFadeDuration property transition options
|
||||
*
|
||||
* @param options transition options for Float
|
||||
*/
|
||||
public void setRasterFadeDurationTransition(TransitionOptions options) {
|
||||
nativeSetRasterFadeDurationTransition(options.getDuration(), options.getDelay());
|
||||
}
|
||||
|
||||
private native Object nativeGetRasterOpacity();
|
||||
|
||||
private native TransitionOptions nativeGetRasterOpacityTransition();
|
||||
@@ -301,10 +288,6 @@ public class RasterLayer extends Layer {
|
||||
|
||||
private native Object nativeGetRasterFadeDuration();
|
||||
|
||||
private native TransitionOptions nativeGetRasterFadeDurationTransition();
|
||||
|
||||
private native void nativeSetRasterFadeDurationTransition(long duration, long delay);
|
||||
|
||||
@Override
|
||||
protected native void finalize() throws Throwable;
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import android.support.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* An icon or a text label.
|
||||
*
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.support.annotation.ColorInt;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.functions.Function;
|
||||
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.functions.Function;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Constructs paint/layout properties for Layers
|
||||
@@ -154,9 +155,9 @@ public class PropertyFactory {
|
||||
|
||||
<% } -%>
|
||||
<% } -%>
|
||||
@SuppressLint("DefaultLocale")
|
||||
public static String colorToRgbaString(@ColorInt int value) {
|
||||
return String.format("rgba(%d, %d, %d, %d)", (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
|
||||
return String.format(Locale.US,"rgba(%d, %d, %d, %d)",
|
||||
(value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user