|
39 | 39 | * <li>image scale type</li>
|
40 | 40 | * <li>decoding options (including bitmap decoding configuration)</li>
|
41 | 41 | * <li>delay before loading of image</li>
|
42 |
| - * <li>auxiliary object which will be passed to {@link ImageDownloader#getStream(java.net.URI, Object) ImageDownloader}</li> |
| 42 | + * <li>auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object) ImageDownloader}</li> |
43 | 43 | * <li>pre-processor for image Bitmap (before caching in memory)</li>
|
44 | 44 | * <li>post-processor for image Bitmap (after caching in memory, before displaying)</li>
|
45 | 45 | * <li>how decoded {@link Bitmap} will be displayed</li>
|
@@ -229,24 +229,54 @@ public Builder showImageOnFail(int imageRes) {
|
229 | 229 | return this;
|
230 | 230 | }
|
231 | 231 |
|
232 |
| - /** {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start */ |
| 232 | + /** |
| 233 | + * {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start |
| 234 | + * |
| 235 | + * @deprecated Use {@link #resetViewBeforeLoading(boolean) resetViewBeforeLoading(true)} instead |
| 236 | + */ |
233 | 237 | public Builder resetViewBeforeLoading() {
|
234 | 238 | resetViewBeforeLoading = true;
|
235 | 239 | return this;
|
236 | 240 | }
|
237 | 241 |
|
238 |
| - /** Loaded image will be cached in memory */ |
| 242 | + /** Sets whether {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start */ |
| 243 | + public Builder resetViewBeforeLoading(boolean resetViewBeforeLoading) { |
| 244 | + this.resetViewBeforeLoading = resetViewBeforeLoading; |
| 245 | + return this; |
| 246 | + } |
| 247 | + |
| 248 | + /** |
| 249 | + * Loaded image will be cached in memory |
| 250 | + * |
| 251 | + * @deprecated Use {@link #cacheInMemory(boolean) cacheInMemory(true)} instead |
| 252 | + */ |
239 | 253 | public Builder cacheInMemory() {
|
240 | 254 | cacheInMemory = true;
|
241 | 255 | return this;
|
242 | 256 | }
|
243 | 257 |
|
244 |
| - /** Loaded image will be cached on disc */ |
| 258 | + /** Sets whether loaded image will be cached in memory */ |
| 259 | + public Builder cacheInMemory(boolean cacheInMemory) { |
| 260 | + this.cacheInMemory = cacheInMemory; |
| 261 | + return this; |
| 262 | + } |
| 263 | + |
| 264 | + /** |
| 265 | + * Loaded image will be cached on disc |
| 266 | + * |
| 267 | + * @deprecated Use {@link #cacheOnDisc(boolean) cacheOnDisc(true)} instead |
| 268 | + */ |
245 | 269 | public Builder cacheOnDisc() {
|
246 | 270 | cacheOnDisc = true;
|
247 | 271 | return this;
|
248 | 272 | }
|
249 | 273 |
|
| 274 | + /** Sets whether loaded image will be cached on disc */ |
| 275 | + public Builder cacheOnDisc(boolean cacheOnDisc) { |
| 276 | + this.cacheOnDisc = cacheOnDisc; |
| 277 | + return this; |
| 278 | + } |
| 279 | + |
250 | 280 | /**
|
251 | 281 | * Sets {@linkplain ImageScaleType scale type} for decoding image. This parameter is used while define scale
|
252 | 282 | * size for decoding image to Bitmap. Default value - {@link ImageScaleType#IN_SAMPLE_POWER_OF_2}
|
@@ -281,7 +311,7 @@ public Builder delayBeforeLoading(int delayInMillis) {
|
281 | 311 | return this;
|
282 | 312 | }
|
283 | 313 |
|
284 |
| - /** Sets auxiliary object which will be passed to {@link ImageDownloader#getStream(java.net.URI, Object)} */ |
| 314 | + /** Sets auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object)} */ |
285 | 315 | public Builder extraForDownloader(Object extra) {
|
286 | 316 | this.extraForDownloader = extra;
|
287 | 317 | return this;
|
|
0 commit comments