Skip to content

Commit

Permalink
Issue #252 - Introduced DisplayImageOptions.cacheInMemory(boolean), …
Browse files Browse the repository at this point in the history
….cacheOnDisc(boolean), resetViewBeforeLoading(boolean)

  Deprecated appropriate methods without boolean param
  • Loading branch information
nostra13 committed Jun 28, 2013
1 parent ce48178 commit ddf34ed
Showing 1 changed file with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* <li>image scale type</li>
* <li>decoding options (including bitmap decoding configuration)</li>
* <li>delay before loading of image</li>
* <li>auxiliary object which will be passed to {@link ImageDownloader#getStream(java.net.URI, Object) ImageDownloader}</li>
* <li>auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object) ImageDownloader}</li>
* <li>pre-processor for image Bitmap (before caching in memory)</li>
* <li>post-processor for image Bitmap (after caching in memory, before displaying)</li>
* <li>how decoded {@link Bitmap} will be displayed</li>
Expand Down Expand Up @@ -229,24 +229,54 @@ public Builder showImageOnFail(int imageRes) {
return this;
}

/** {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start */
/**
* {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start
*
* @deprecated Use {@link #resetViewBeforeLoading(boolean) resetViewBeforeLoading(true)} instead
*/
public Builder resetViewBeforeLoading() {
resetViewBeforeLoading = true;
return this;
}

/** Loaded image will be cached in memory */
/** Sets whether {@link android.widget.ImageView ImageView} will be reset (set <b>null</b>) before image loading start */
public Builder resetViewBeforeLoading(boolean resetViewBeforeLoading) {
this.resetViewBeforeLoading = resetViewBeforeLoading;
return this;
}

/**
* Loaded image will be cached in memory
*
* @deprecated Use {@link #cacheInMemory(boolean) cacheInMemory(true)} instead
*/
public Builder cacheInMemory() {
cacheInMemory = true;
return this;
}

/** Loaded image will be cached on disc */
/** Sets whether loaded image will be cached in memory */
public Builder cacheInMemory(boolean cacheInMemory) {
this.cacheInMemory = cacheInMemory;
return this;
}

/**
* Loaded image will be cached on disc
*
* @deprecated Use {@link #cacheOnDisc(boolean) cacheOnDisc(true)} instead
*/
public Builder cacheOnDisc() {
cacheOnDisc = true;
return this;
}

/** Sets whether loaded image will be cached on disc */
public Builder cacheOnDisc(boolean cacheOnDisc) {
this.cacheOnDisc = cacheOnDisc;
return this;
}

/**
* Sets {@linkplain ImageScaleType scale type} for decoding image. This parameter is used while define scale
* size for decoding image to Bitmap. Default value - {@link ImageScaleType#IN_SAMPLE_POWER_OF_2}
Expand Down Expand Up @@ -281,7 +311,7 @@ public Builder delayBeforeLoading(int delayInMillis) {
return this;
}

/** Sets auxiliary object which will be passed to {@link ImageDownloader#getStream(java.net.URI, Object)} */
/** Sets auxiliary object which will be passed to {@link ImageDownloader#getStream(String, Object)} */
public Builder extraForDownloader(Object extra) {
this.extraForDownloader = extra;
return this;
Expand Down

0 comments on commit ddf34ed

Please sign in to comment.