Skip to content

Commit

Permalink
Update PhotoActivity.java
Browse files Browse the repository at this point in the history
Prevent OOM using .fit() on Picasso load.
  • Loading branch information
sarriaroman authored Oct 24, 2016
1 parent 92bd4ed commit 9f200b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/android/PhotoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private void loadImage() {
if( imageUrl.startsWith("http") ) {
Picasso.with(this)
.load(imageUrl)
.fit()
.into(photo, new com.squareup.picasso.Callback() {
@Override
public void onSuccess() {
Expand Down

1 comment on commit 9f200b1

@sarinsukumar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This destroys aspect ratio of images when viewed. Image is stretched and skewed. Can you please remove or fix it ?

Please sign in to comment.