@Override public Overlay set(final int pIndex, final Overlay pElement) { Overlay overlay = mOverlayList.set(pIndex, pElement); if (pElement instanceof SafeDrawOverlay) ((SafeDrawOverlay) pElement).setUseSafeCanvas(this.isUsingSafeCanvas()); return overlay; }
public void setUseSafeCanvas(boolean useSafeCanvas) { mUseSafeCanvas = useSafeCanvas; for (Overlay overlay : mOverlayList) if (overlay instanceof SafeDrawOverlay) ((SafeDrawOverlay) overlay).setUseSafeCanvas(this.isUsingSafeCanvas()); if (mTilesOverlay != null) { mTilesOverlay.setUseSafeCanvas(this.isUsingSafeCanvas()); } }
@Override public void add(final int pIndex, final Overlay pElement) { mOverlayList.add(pIndex, pElement); if (pElement instanceof SafeDrawOverlay) ((SafeDrawOverlay) pElement).setUseSafeCanvas(this.isUsingSafeCanvas()); }