Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/com/androidquery/callback/BitmapAjaxCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ public Bitmap transform(String url, byte[] data, AjaxStatus status) {

if(status.getCode() != 200){
invalid = true;
bm = preset;//if network was error,we hope show preset bitmap always
}


Expand Down Expand Up @@ -862,13 +863,7 @@ private void presetBitmap(String url, ImageView v){
private static final int FADE_DUR = 300;

private void setBitmap(String url, ImageView iv, Bitmap bm, boolean isPreset){

if(bm == null){
iv.setImageDrawable(null);
return;
}

if(isPreset){
if(isPreset||bm == null){//if result bitmap was null,we hope show preset bitmap always
iv.setImageDrawable(makeDrawable(iv, bm, ratio, anchor));
return;
}
Expand Down