Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abduelrahman committed Feb 17, 2020
1 parent b3b2d69 commit 09e96a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions leon/src/main/java/am/leon/LeonImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import androidx.annotation.Nullable;

import com.squareup.picasso.MemoryPolicy;
import com.squareup.picasso.NetworkPolicy;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Transformation;

Expand Down Expand Up @@ -296,16 +294,12 @@ private String handleObject(Object object) {
private void executePicasso(String urlPath, Transformation transformation) {
if (transformation != null)
Picasso.get().load(urlPath)
.networkPolicy(NetworkPolicy.NO_CACHE)
.memoryPolicy(MemoryPolicy.NO_CACHE)
.placeholder(getPlaceHolderImageRes())
.error(getReloadImageRes())
.transform(transformation)
.into(this, new PicassoCallback(this, urlPath, transformation));
else
Picasso.get().load(urlPath)
.networkPolicy(NetworkPolicy.NO_CACHE)
.memoryPolicy(MemoryPolicy.NO_CACHE)
.placeholder(getPlaceHolderImageRes())
.error(getReloadImageRes())
.into(this, new PicassoCallback(this, urlPath));
Expand All @@ -314,8 +308,6 @@ private void executePicasso(String urlPath, Transformation transformation) {

protected void executePicasso(String urlPath, boolean fromFullScreen) {
Picasso.get().load(urlPath)
.networkPolicy(NetworkPolicy.NO_CACHE)
.memoryPolicy(MemoryPolicy.NO_CACHE)
.placeholder(getPlaceHolderImageRes())
.error(getReloadImageRes())
.into(this, new PicassoCallback(this, urlPath, fromFullScreen));
Expand Down
4 changes: 2 additions & 2 deletions leon/src/main/java/am/leon/PicassoCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ private void viewInit() {
imageView.setScaleX(.1f);
imageView.setScaleY(.1f);
} else {
imageView.setScaleX(.5f);
imageView.setScaleY(.5f);
imageView.setScaleX(.3f);
imageView.setScaleY(.3f);
}
}

Expand Down

0 comments on commit 09e96a4

Please sign in to comment.