यह ठीक तरह हर image.For जैसे कुछ लोड करने के लिए पिकासो की एक नई instace बनाने के लिए है: एक listAdaptor
.Does यह नहीं बना की getView()
मेंयह पिकासो हर के नए उदाहरण बनाने के लिए ठीक है
Picasso.with(context)
.load(url)
.placeholder(R.drawable.placeholder)
.error(R.drawable.error)
.centerInside(
.tag(context)
.into(holder.image);
नई LruCache
हर जो अंततः यह OOM को बढ़ावा मिलेगा।
इसके अलावा Context
पिकासो को दिया गया Activity Context
हो सकता है कर सकते हैं: Souce कोड
/** Start building a new {@link Picasso} instance. */
public Builder(Context context) {
if (context == null) {
throw new IllegalArgumentException("Context must not be null.");
}
this.context = context.getApplicationContext();
}
मैं 'एकल, वैश्विक आवेदन वर्तमान process' की वस्तु तनाव करना चाहते हैं। इसका मतलब है कि आपको लगता है कि अपने app पर चल रहा है प्रक्रियाओं में से हर एक के लिए पिकासो का एक उदाहरण है की आवश्यकता होगी। – Sebastiano