From ec0e1d2826667d5b850bb07d9604efddcd8b7276 Mon Sep 17 00:00:00 2001 From: zackhow Date: Thu, 30 Aug 2018 17:14:09 -0400 Subject: [PATCH 1/2] Android: Fix cover stretching --- .../dolphinemu/dolphinemu/utils/PicassoUtils.java | 13 ++++++++++--- .../Android/app/src/main/res/layout/card_game.xml | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PicassoUtils.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PicassoUtils.java index 353d6b7efd..5623670602 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PicassoUtils.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PicassoUtils.java @@ -21,9 +21,10 @@ public class PicassoUtils { 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 @@ public class PicassoUtils { 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 @@ public class PicassoUtils { 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 class PicassoUtils .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 class PicassoUtils .load(CoverHelper.buildGameTDBUrl(gameFile, "EN")) .fit() .noFade() + .fit() + .centerInside() .noPlaceholder() .config(Bitmap.Config.ARGB_8888) .error(R.drawable.no_banner) diff --git a/Source/Android/app/src/main/res/layout/card_game.xml b/Source/Android/app/src/main/res/layout/card_game.xml index 488fda5232..1744fa1d24 100644 --- a/Source/Android/app/src/main/res/layout/card_game.xml +++ b/Source/Android/app/src/main/res/layout/card_game.xml @@ -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="330dp" android:transitionName="card_game" android:focusable="true" android:clickable="true" From 374b0bf2dc7b8b5b665f392747c69cd06b92cecf Mon Sep 17 00:00:00 2001 From: zackhow Date: Fri, 31 Aug 2018 21:15:28 -0400 Subject: [PATCH 2/2] Android: show more games per row --- Source/Android/app/src/main/res/layout/card_game.xml | 2 +- Source/Android/app/src/main/res/values-w1000dp/integers.xml | 2 +- Source/Android/app/src/main/res/values-w500dp/integers.xml | 2 +- Source/Android/app/src/main/res/values-w750dp/integers.xml | 2 +- Source/Android/app/src/main/res/values/integers.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Android/app/src/main/res/layout/card_game.xml b/Source/Android/app/src/main/res/layout/card_game.xml index 1744fa1d24..e3db4abf76 100644 --- a/Source/Android/app/src/main/res/layout/card_game.xml +++ b/Source/Android/app/src/main/res/layout/card_game.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" tools:layout_width="160dp" - android:layout_height="330dp" + android:layout_height="270dp" android:transitionName="card_game" android:focusable="true" android:clickable="true" diff --git a/Source/Android/app/src/main/res/values-w1000dp/integers.xml b/Source/Android/app/src/main/res/values-w1000dp/integers.xml index 4dbc25806e..2609297d5b 100644 --- a/Source/Android/app/src/main/res/values-w1000dp/integers.xml +++ b/Source/Android/app/src/main/res/values-w1000dp/integers.xml @@ -1,4 +1,4 @@ - 6 + 8 \ No newline at end of file diff --git a/Source/Android/app/src/main/res/values-w500dp/integers.xml b/Source/Android/app/src/main/res/values-w500dp/integers.xml index f049d8b44e..5cd4e24f38 100644 --- a/Source/Android/app/src/main/res/values-w500dp/integers.xml +++ b/Source/Android/app/src/main/res/values-w500dp/integers.xml @@ -1,4 +1,4 @@ - 3 + 4 \ No newline at end of file diff --git a/Source/Android/app/src/main/res/values-w750dp/integers.xml b/Source/Android/app/src/main/res/values-w750dp/integers.xml index 5cd4e24f38..4dbc25806e 100644 --- a/Source/Android/app/src/main/res/values-w750dp/integers.xml +++ b/Source/Android/app/src/main/res/values-w750dp/integers.xml @@ -1,4 +1,4 @@ - 4 + 6 \ No newline at end of file diff --git a/Source/Android/app/src/main/res/values/integers.xml b/Source/Android/app/src/main/res/values/integers.xml index dfec4d8361..b83774443b 100644 --- a/Source/Android/app/src/main/res/values/integers.xml +++ b/Source/Android/app/src/main/res/values/integers.xml @@ -1,6 +1,6 @@ - 2 + 3 865