Permalink
Browse files

Merge pull request #7387 from zackhow/covers-nostretch

Android: Fix cover stretching and show more games per row
  • Loading branch information...
Helios747 committed Sep 1, 2018
2 parents 3405c7d + 374b0bf commit 4a34dba00137ec9d9456e2f500ffd88731112909
@@ -21,9 +21,10 @@ public static void loadGameBanner(ImageView imageView, GameFile gameFile)
{
Picasso.with(imageView.getContext())
.load(cover)
.fit()
.noFade()
.noPlaceholder()
.fit()
.centerInside()
.config(Bitmap.Config.ARGB_8888)
.error(R.drawable.no_banner)
.into(imageView);
@@ -32,9 +33,10 @@ else if ((cover = new File(gameFile.getCoverPath())).exists())
{
Picasso.with(imageView.getContext())
.load(cover)
.fit()
.noFade()
.noPlaceholder()
.fit()
.centerInside()
.config(Bitmap.Config.ARGB_8888)
.error(R.drawable.no_banner)
.into(imageView);
@@ -47,9 +49,10 @@ else if ((cover = new File(gameFile.getCoverPath())).exists())
{
Picasso.with(imageView.getContext())
.load(CoverHelper.buildGameTDBUrl(gameFile, CoverHelper.getRegion(gameFile)))
.fit()
.noFade()
.noPlaceholder()
.fit()
.centerInside()
.config(Bitmap.Config.ARGB_8888)
.error(R.drawable.no_banner)
.into(imageView, new Callback()
@@ -68,6 +71,8 @@ public void onError() // Second pass using US region
.load(CoverHelper.buildGameTDBUrl(gameFile, "US"))
.fit()
.noFade()
.fit()
.centerInside()
.noPlaceholder()
.config(Bitmap.Config.ARGB_8888)
.error(R.drawable.no_banner)
@@ -88,6 +93,8 @@ public void onError() // Third and last pass using EN region
.load(CoverHelper.buildGameTDBUrl(gameFile, "EN"))
.fit()
.noFade()
.fit()
.centerInside()
.noPlaceholder()
.config(Bitmap.Config.ARGB_8888)
.error(R.drawable.no_banner)
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
tools:layout_width="160dp"
android:layout_height="368dp"
android:layout_height="270dp"
android:transitionName="card_game"
android:focusable="true"
android:clickable="true"
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="game_grid_columns">6</integer>
<integer name="game_grid_columns">8</integer>
</resources>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="game_grid_columns">3</integer>
<integer name="game_grid_columns">4</integer>
</resources>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="game_grid_columns">4</integer>
<integer name="game_grid_columns">6</integer>
</resources>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="game_grid_columns">2</integer>
<integer name="game_grid_columns">3</integer>
<!-- Default GameCube landscape layout -->
<integer name="BUTTON_A_X">865</integer>

0 comments on commit 4a34dba

Please sign in to comment.