0
我見過很多關於如何在MapView上使用包中的圖像創建ItemizedOverlay的示例。我已經看到了很多關於如何從URL獲取Drawable的例子。我甚至設法將兩者拼湊在一起,以便使用從遠程獲取的位圖製作的繪圖。現在我遇到的問題是如何使Drawable cachable?如何使用URL中的位圖作爲ItemizedOverlay的圖標 - WITH CACHE?
我見過很多關於如何在MapView上使用包中的圖像創建ItemizedOverlay的示例。我已經看到了很多關於如何從URL獲取Drawable的例子。我甚至設法將兩者拼湊在一起,以便使用從遠程獲取的位圖製作的繪圖。現在我遇到的問題是如何使Drawable cachable?如何使用URL中的位圖作爲ItemizedOverlay的圖標 - WITH CACHE?
不要高速緩存drawables - 這可能導致memory leak。
您應該緩存位圖並在需要時創建Drawable。