Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class ClusterRendererMultipleItems<T extends ClusterItem> implements Clus
private final float mDensity;
private boolean mAnimate;
private long mAnimationDurationMs;
private final Executor mExecutor = Executors.newSingleThreadExecutor();
private final Executor mExecutor;
private final Queue<AnimationTask> ongoingAnimations = new LinkedList<>();
private static TimeInterpolator animationInterp = new DecelerateInterpolator();

Expand Down Expand Up @@ -171,7 +171,12 @@ public void setAnimationInterpolator(TimeInterpolator interpolator) {
private ClusterManager.OnClusterItemInfoWindowLongClickListener<T> mItemInfoWindowLongClickListener;

public ClusterRendererMultipleItems(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
this(context, map, clusterManager, Executors.newSingleThreadExecutor());
}

public ClusterRendererMultipleItems(Context context, GoogleMap map, ClusterManager<T> clusterManager, Executor executor) {
mMap = map;
mExecutor = executor;
mAnimate = true;
mAnimationDurationMs = 300;
mDensity = context.getResources().getDisplayMetrics().density;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class DefaultAdvancedMarkersClusterRenderer<T extends ClusterItem> implem
private final float mDensity;
private boolean mAnimate;
private long mAnimationDurationMs;
private final Executor mExecutor = Executors.newSingleThreadExecutor();
private final Executor mExecutor;

private static final int[] BUCKETS = {10, 20, 50, 100, 200, 500, 1000};
private ShapeDrawable mColoredCircleBackground;
Expand Down Expand Up @@ -133,7 +133,12 @@ public class DefaultAdvancedMarkersClusterRenderer<T extends ClusterItem> implem
private ClusterManager.OnClusterItemInfoWindowLongClickListener<T> mItemInfoWindowLongClickListener;

public DefaultAdvancedMarkersClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
this(context, map, clusterManager, Executors.newSingleThreadExecutor());
}

public DefaultAdvancedMarkersClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager, Executor executor) {
mMap = map;
mExecutor = executor;
mAnimate = true;
mAnimationDurationMs = 300;
mDensity = context.getResources().getDisplayMetrics().density;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class DefaultClusterRenderer<T extends ClusterItem> implements ClusterRen
private final float mDensity;
private boolean mAnimate;
private long mAnimationDurationMs;
private final Executor mExecutor = Executors.newSingleThreadExecutor();
private final Executor mExecutor;

private static final int[] BUCKETS = {10, 20, 50, 100, 200, 500, 1000};
private ShapeDrawable mColoredCircleBackground;
Expand Down Expand Up @@ -132,7 +132,12 @@ public class DefaultClusterRenderer<T extends ClusterItem> implements ClusterRen
private ClusterManager.OnClusterItemInfoWindowLongClickListener<T> mItemInfoWindowLongClickListener;

public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager) {
this(context, map, clusterManager, Executors.newSingleThreadExecutor());
}

public DefaultClusterRenderer(Context context, GoogleMap map, ClusterManager<T> clusterManager, Executor executor) {
mMap = map;
mExecutor = executor;
mAnimate = true;
mAnimationDurationMs = 300;
mDensity = context.getResources().getDisplayMetrics().density;
Expand Down
Loading