Skip to content
Permalink
Browse files

Android: Update Picasso lib to latest version

  • Loading branch information...
mahdihijazi committed Oct 27, 2018
1 parent 0140009 commit 1da69811b8a15a31d7db9573dbe57a2dba6cf6e8
@@ -96,7 +96,7 @@ dependencies {
implementation 'de.hdodenhof:circleimageview:2.1.0'

// For loading huge screenshots from the disk.
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.71828'

// Allows FRP-style asynchronous operations in Android.
implementation 'io.reactivex:rxandroid:1.2.1'
@@ -67,7 +67,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState)
});

// Fill in the view contents.
Picasso.with(imageGameScreen.getContext())
Picasso.get()
.load(getArguments().getString(gameFile.getScreenshotPath()))
.fit()
.centerCrop()
@@ -19,7 +19,7 @@ public static void loadGameBanner(ImageView imageView, GameFile gameFile)
File cover = new File(gameFile.getCustomCoverPath());
if (cover.exists())
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(cover)
.noFade()
.noPlaceholder()
@@ -31,7 +31,7 @@ public static void loadGameBanner(ImageView imageView, GameFile gameFile)
}
else if ((cover = new File(gameFile.getCoverPath())).exists())
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(cover)
.noFade()
.noPlaceholder()
@@ -47,7 +47,7 @@ else if ((cover = new File(gameFile.getCoverPath())).exists())
*/
else
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, CoverHelper.getRegion(gameFile)))
.noFade()
.noPlaceholder()
@@ -65,9 +65,9 @@ public void onSuccess()
}

@Override
public void onError() // Second pass using US region
public void onError(Exception ex) // Second pass using US region
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, "US"))
.fit()
.noFade()
@@ -87,9 +87,9 @@ public void onSuccess()
}

@Override
public void onError() // Third and last pass using EN region
public void onError(Exception ex) // Third and last pass using EN region
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, "EN"))
.fit()
.noFade()
@@ -110,7 +110,7 @@ public void onSuccess()
}

@Override
public void onError()
public void onError(Exception ex)
{
}
});

0 comments on commit 1da6981

Please sign in to comment.
You can’t perform that action at this time.