Cherry pick v5.0.2 changes (#8586)
* [android] execute resource transform callback on the right thread * [android] allow resetting of resource transform callback * update CHANGELOG for v5.0.2 * [android] - correct anchoring when Icon is updated (#8519)
This commit is contained in:
@@ -389,6 +389,15 @@ public class MarkerView extends Marker {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates the MarkerView resulting in remeasuring the View.
|
||||
*/
|
||||
void invalidate() {
|
||||
width = height = 0;
|
||||
offsetX = offsetY = MapboxConstants.UNMEASURED;
|
||||
markerViewManager.invalidateViewMarkersInVisibleRegion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the String representation of a MarkerView.
|
||||
*
|
||||
|
||||
@@ -232,6 +232,7 @@ public class MarkerViewManager implements MapView.OnMapChangedListener {
|
||||
View convertView = markerViewMap.get(markerView);
|
||||
if (convertView != null && convertView instanceof ImageView) {
|
||||
((ImageView) convertView).setImageBitmap(markerView.getIcon().getBitmap());
|
||||
markerView.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,9 +123,9 @@ public class FileSource {
|
||||
* The callback will be executed on the main thread once for every requested URL.
|
||||
* </p>
|
||||
*
|
||||
* @param callback the callback to be invoked
|
||||
* @param callback the callback to be invoked or null to reset
|
||||
*/
|
||||
public native void setResourceTransform(@NonNull final ResourceTransformCallback callback);
|
||||
public native void setResourceTransform(final ResourceTransformCallback callback);
|
||||
|
||||
private native void initialize(String accessToken, String cachePath, String apkPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user