From 870912722ed515e4ead17aee3aa7635abfb4f192 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 15 Jun 2019 18:37:48 +0200 Subject: [PATCH 01/13] Revert "Android: Remove dead code and related lib " This reverts commit 593b69728d7e7813a3e3bbd1bfea2f2f56f3a38e. --- Source/Android/app/build.gradle | 3 + .../dolphinemu/dialogs/GameDetailsDialog.java | 83 +++++++++++ .../main/res/layout/dialog_game_details.xml | 130 ++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java create mode 100644 Source/Android/app/src/main/res/layout/dialog_game_details.xml diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 2cde9e0676..aa675a97b8 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -89,6 +89,9 @@ dependencies { // For REST calls implementation 'com.android.volley:volley:1.1.1' + // For showing the banner as a circle a-la Material Design Guidelines + implementation 'de.hdodenhof:circleimageview:2.1.0' + // For loading huge screenshots from the disk. implementation 'com.squareup.picasso:picasso:2.71828' diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java new file mode 100644 index 0000000000..be254a4b7c --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -0,0 +1,83 @@ +package org.dolphinemu.dolphinemu.dialogs; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.os.Bundle; +import android.support.design.widget.FloatingActionButton; +import android.support.v4.app.DialogFragment; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.TextView; + +import com.squareup.picasso.Picasso; + +import org.dolphinemu.dolphinemu.R; +import org.dolphinemu.dolphinemu.activities.EmulationActivity; +import org.dolphinemu.dolphinemu.model.GameFile; +import org.dolphinemu.dolphinemu.services.GameFileCacheService; + +import de.hdodenhof.circleimageview.CircleImageView; + +public final class GameDetailsDialog extends DialogFragment +{ + private static final String ARG_GAME_PATH = "game_path"; + + public static GameDetailsDialog newInstance(String gamePath) + { + GameDetailsDialog fragment = new GameDetailsDialog(); + + Bundle arguments = new Bundle(); + arguments.putString(ARG_GAME_PATH, gamePath); + fragment.setArguments(arguments); + + return fragment; + } + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) + { + GameFile gameFile = GameFileCacheService.addOrGet(getArguments().getString(ARG_GAME_PATH)); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + ViewGroup contents = (ViewGroup) getActivity().getLayoutInflater() + .inflate(R.layout.dialog_game_details, null); + + final ImageView imageGameScreen = contents.findViewById(R.id.image_game_screen); + CircleImageView circleBanner = contents.findViewById(R.id.circle_banner); + + TextView textTitle = contents.findViewById(R.id.text_game_title); + TextView textDescription = contents.findViewById(R.id.text_description); + + TextView textCountry = contents.findViewById(R.id.text_country); + TextView textCompany = contents.findViewById(R.id.text_company); + + FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch); + + String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()]; + + textTitle.setText(gameFile.getTitle()); + textDescription.setText(gameFile.getDescription()); + textCountry.setText(country); + textCompany.setText(gameFile.getCompany()); + + buttonLaunch.setOnClickListener(view -> + { + // Start the emulation activity and send the path of the clicked ROM to it. + EmulationActivity.launch(getActivity(), gameFile); + }); + + // Fill in the view contents. + Picasso.get() + .load(getArguments().getString(gameFile.getScreenshotPath())) + .fit() + .centerCrop() + .noFade() + .noPlaceholder() + .into(imageGameScreen); + + circleBanner.setImageResource(R.drawable.no_banner); + + builder.setView(contents); + return builder.create(); + } +} diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml new file mode 100644 index 0000000000..61cc212f55 --- /dev/null +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 00c4dad7849e7b88c006475c961ce125a29ccb8a Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 15 Jun 2019 19:08:35 +0200 Subject: [PATCH 02/13] Android: Bring back the game details dialog It was made inaccessible in e19922c (I'm not sure why) and then removed by 593b697. --- .../dolphinemu/adapters/GameAdapter.java | 3 ++- .../dolphinemu/adapters/GameRowPresenter.java | 3 ++- .../dolphinemu/dialogs/GameDetailsDialog.java | 10 ++++++---- .../dolphinemu/dialogs/GameSettingsDialog.java | 18 +++++++++++++----- .../Android/app/src/main/res/values/arrays.xml | 2 ++ 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java index 5cdb4d984d..7d037522ef 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java @@ -146,7 +146,8 @@ public final class GameAdapter extends RecyclerView.Adapter impl } GameSettingsDialog fragment = - GameSettingsDialog.newInstance(gameId, holder.gameFile.getPlatform()); + GameSettingsDialog. + newInstance(holder.gameFile.getPath(), gameId, holder.gameFile.getPlatform()); ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction() .add(fragment, GameSettingsDialog.TAG).commit(); return true; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java index 439c4a94d0..7db90db8aa 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java @@ -91,7 +91,8 @@ public final class GameRowPresenter extends Presenter } GameSettingsDialog fragment = - GameSettingsDialog.newInstance(gameId, holder.gameFile.getPlatform()); + GameSettingsDialog.newInstance(holder.gameFile.getPath(), gameId, + holder.gameFile.getPlatform()); ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction() .add(fragment, GameSettingsDialog.TAG).commit(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index be254a4b7c..133b1ef635 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -1,14 +1,16 @@ package org.dolphinemu.dolphinemu.dialogs; -import android.app.AlertDialog; import android.app.Dialog; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.DialogFragment; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import com.squareup.picasso.Picasso; import org.dolphinemu.dolphinemu.R; @@ -38,7 +40,7 @@ public final class GameDetailsDialog extends DialogFragment { GameFile gameFile = GameFileCacheService.addOrGet(getArguments().getString(ARG_GAME_PATH)); - AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity()); ViewGroup contents = (ViewGroup) getActivity().getLayoutInflater() .inflate(R.layout.dialog_game_details, null); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java index 9d2bf1cf76..a526723c8a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java @@ -6,6 +6,7 @@ import android.os.Bundle; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; import android.widget.Toast; @@ -20,14 +21,16 @@ import java.io.File; public class GameSettingsDialog extends DialogFragment { public static final String TAG = "GameSettingsDialog"; + public static final String ARG_PATH = "path"; public static final String ARG_GAMEID = "game_id"; public static final String ARG_PLATFORM = "platform"; - public static GameSettingsDialog newInstance(String gameId, int platform) + public static GameSettingsDialog newInstance(String path, String gameId, int platform) { GameSettingsDialog fragment = new GameSettingsDialog(); Bundle arguments = new Bundle(); + arguments.putString(ARG_PATH, path); arguments.putString(ARG_GAMEID, gameId); arguments.putInt(ARG_PLATFORM, platform); fragment.setArguments(arguments); @@ -41,6 +44,7 @@ public class GameSettingsDialog extends DialogFragment { AlertDialog.Builder builder = new AlertDialog.Builder(requireContext()); + String path = requireArguments().getString(ARG_PATH); String gameId = requireArguments().getString(ARG_GAMEID); int platform = requireArguments().getInt(ARG_PLATFORM); @@ -52,22 +56,26 @@ public class GameSettingsDialog extends DialogFragment switch (which) { case 0: - SettingsActivity.launch(getContext(), MenuTag.CONFIG, gameId); + GameDetailsDialog.newInstance(path).show((requireActivity()) + .getSupportFragmentManager(), "game_details"); break; case 1: - SettingsActivity.launch(getContext(), MenuTag.GRAPHICS, gameId); + SettingsActivity.launch(getContext(), MenuTag.CONFIG, gameId); break; case 2: - SettingsActivity.launch(getContext(), MenuTag.GCPAD_TYPE, gameId); + SettingsActivity.launch(getContext(), MenuTag.GRAPHICS, gameId); break; case 3: + SettingsActivity.launch(getContext(), MenuTag.GCPAD_TYPE, gameId); + break; + case 4: // Clear option for GC, Wii controls for else if (platform == Platform.GAMECUBE.toInt()) clearGameSettings(gameId); else SettingsActivity.launch(getActivity(), MenuTag.WIIMOTE, gameId); break; - case 4: + case 5: clearGameSettings(gameId); break; } diff --git a/Source/Android/app/src/main/res/values/arrays.xml b/Source/Android/app/src/main/res/values/arrays.xml index 9e2f268151..3cfffe433f 100644 --- a/Source/Android/app/src/main/res/values/arrays.xml +++ b/Source/Android/app/src/main/res/values/arrays.xml @@ -336,12 +336,14 @@ + Details Core Settings GFX Settings GameCube Controller Settings Clear Game Settings + Details Core Settings GFX Settings GameCube Controller Settings From 5ed0cf8e0e9882896ee30b6deb24e971fda44d13 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 15 Jun 2019 20:14:35 +0200 Subject: [PATCH 03/13] Rename GameSettingsDialog to GamePropertiesDialog Since it no longer only contains settings. --- .../dolphinemu/dolphinemu/adapters/GameAdapter.java | 10 +++++----- .../dolphinemu/adapters/GameRowPresenter.java | 8 ++++---- ...eSettingsDialog.java => GamePropertiesDialog.java} | 11 ++++++----- Source/Android/app/src/main/res/values/strings.xml | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) rename Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/{GameSettingsDialog.java => GamePropertiesDialog.java} (89%) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java index 7d037522ef..82d97bee21 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java @@ -13,7 +13,7 @@ import android.view.ViewGroup; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; -import org.dolphinemu.dolphinemu.dialogs.GameSettingsDialog; +import org.dolphinemu.dolphinemu.dialogs.GamePropertiesDialog; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.utils.PicassoUtils; import org.dolphinemu.dolphinemu.viewholders.GameViewHolder; @@ -145,11 +145,11 @@ public final class GameAdapter extends RecyclerView.Adapter impl return true; } - GameSettingsDialog fragment = - GameSettingsDialog. - newInstance(holder.gameFile.getPath(), gameId, holder.gameFile.getPlatform()); + GamePropertiesDialog fragment = + GamePropertiesDialog + .newInstance(holder.gameFile.getPath(), gameId, holder.gameFile.getPlatform()); ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction() - .add(fragment, GameSettingsDialog.TAG).commit(); + .add(fragment, GamePropertiesDialog.TAG).commit(); return true; } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java index 7db90db8aa..6fef4a941f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java @@ -13,7 +13,7 @@ import android.view.ViewGroup; import android.widget.ImageView; import org.dolphinemu.dolphinemu.R; -import org.dolphinemu.dolphinemu.dialogs.GameSettingsDialog; +import org.dolphinemu.dolphinemu.dialogs.GamePropertiesDialog; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.ui.platform.Platform; import org.dolphinemu.dolphinemu.utils.PicassoUtils; @@ -90,11 +90,11 @@ public final class GameRowPresenter extends Presenter return true; } - GameSettingsDialog fragment = - GameSettingsDialog.newInstance(holder.gameFile.getPath(), gameId, + GamePropertiesDialog fragment = + GamePropertiesDialog.newInstance(holder.gameFile.getPath(), gameId, holder.gameFile.getPlatform()); ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction() - .add(fragment, GameSettingsDialog.TAG).commit(); + .add(fragment, GamePropertiesDialog.TAG).commit(); return true; }); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java similarity index 89% rename from Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java rename to Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java index a526723c8a..f5f6ea5eae 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameSettingsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java @@ -18,16 +18,16 @@ import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import java.io.File; -public class GameSettingsDialog extends DialogFragment +public class GamePropertiesDialog extends DialogFragment { - public static final String TAG = "GameSettingsDialog"; + public static final String TAG = "GamePropertiesDialog"; public static final String ARG_PATH = "path"; public static final String ARG_GAMEID = "game_id"; public static final String ARG_PLATFORM = "platform"; - public static GameSettingsDialog newInstance(String path, String gameId, int platform) + public static GamePropertiesDialog newInstance(String path, String gameId, int platform) { - GameSettingsDialog fragment = new GameSettingsDialog(); + GamePropertiesDialog fragment = new GamePropertiesDialog(); Bundle arguments = new Bundle(); arguments.putString(ARG_PATH, path); @@ -48,7 +48,8 @@ public class GameSettingsDialog extends DialogFragment String gameId = requireArguments().getString(ARG_GAMEID); int platform = requireArguments().getInt(ARG_PLATFORM); - builder.setTitle(requireContext().getString(R.string.preferences_game_settings) + ": " + gameId) + builder.setTitle(requireContext() + .getString(R.string.preferences_game_properties) + ": " + gameId) .setItems(platform == Platform.GAMECUBE.toInt() ? R.array.gameSettingsMenusGC : R.array.gameSettingsMenusWii, (dialog, which) -> diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 2ecbb07df7..c55de039a9 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -280,7 +280,7 @@ Save and Exit Settings - Game Settings + Game Properties Extension Bindings Junk Data Found The settings file for this game contains junk data created by an old version of Dolphin. Would you like to fix this by deleting the settings file for this game? All game-specific settings and cheats that you have added will be removed. This cannot be undone. From c2952c466f7945428d12e249a9675995de810537 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 10:00:04 +0200 Subject: [PATCH 04/13] Bring back game banner loading code deleted in 3f21975 --- .../dolphinemu/adapters/GameAdapter.java | 2 +- .../dolphinemu/adapters/GameRowPresenter.java | 2 +- .../utils/GameBannerRequestHandler.java | 36 +++++++++++++++++++ .../dolphinemu/utils/PicassoUtils.java | 23 +++++++++--- 4 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java index 82d97bee21..3f463b372a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java @@ -69,7 +69,7 @@ public final class GameAdapter extends RecyclerView.Adapter impl public void onBindViewHolder(GameViewHolder holder, int position) { GameFile gameFile = mGameFiles.get(position); - PicassoUtils.loadGameBanner(holder.imageScreenshot, gameFile); + PicassoUtils.loadGameCover(holder.imageScreenshot, gameFile); holder.textGameTitle.setText(gameFile.getTitle()); holder.textCompany.setText(gameFile.getCompany()); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java index 6fef4a941f..d2d720db53 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java @@ -49,7 +49,7 @@ public final class GameRowPresenter extends Presenter GameFile gameFile = (GameFile) item; holder.imageScreenshot.setImageDrawable(null); - PicassoUtils.loadGameBanner(holder.imageScreenshot, gameFile); + PicassoUtils.loadGameCover(holder.imageScreenshot, gameFile); holder.cardParent.setTitleText(gameFile.getTitle()); holder.cardParent.setContentText(gameFile.getCompany()); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java new file mode 100644 index 0000000000..81362404d1 --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java @@ -0,0 +1,36 @@ +package org.dolphinemu.dolphinemu.utils; + +import android.graphics.Bitmap; + +import com.squareup.picasso.Picasso; +import com.squareup.picasso.Request; +import com.squareup.picasso.RequestHandler; + +import org.dolphinemu.dolphinemu.model.GameFile; + +public class GameBannerRequestHandler extends RequestHandler +{ + private GameFile mGameFile; + + public GameBannerRequestHandler(GameFile gameFile) + { + mGameFile = gameFile; + } + + @Override + public boolean canHandleRequest(Request data) + { + return true; + } + + @Override + public Result load(Request request, int networkPolicy) + { + int[] vector = mGameFile.getBanner(); + int width = mGameFile.getBannerWidth(); + int height = mGameFile.getBannerHeight(); + Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + bitmap.setPixels(vector, 0, width, 0, 0, width, height); + return new Result(bitmap, Picasso.LoadedFrom.DISK); + } +} 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 cc272e72f9..4dc0c200a6 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 @@ -2,6 +2,7 @@ package org.dolphinemu.dolphinemu.utils; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; +import android.net.Uri; import android.widget.ImageView; import com.squareup.picasso.Callback; @@ -15,6 +16,22 @@ import java.io.File; public class PicassoUtils { public static void loadGameBanner(ImageView imageView, GameFile gameFile) + { + Picasso picassoInstance = new Picasso.Builder(imageView.getContext()) + .addRequestHandler(new GameBannerRequestHandler(gameFile)) + .build(); + + picassoInstance + .load(Uri.parse("iso:/" + gameFile.getPath())) + .fit() + .noFade() + .noPlaceholder() + .config(Bitmap.Config.RGB_565) + .error(R.drawable.no_banner) + .into(imageView); + } + + public static void loadGameCover(ImageView imageView, GameFile gameFile) { File cover = new File(gameFile.getCustomCoverPath()); if (cover.exists()) @@ -41,10 +58,8 @@ public class PicassoUtils .error(R.drawable.no_banner) .into(imageView); } - /** - * GameTDB has a pretty close to complete collection for US/EN covers. First pass at getting - * the cover will be by the disk's region, second will be the US cover, and third EN. - */ + // GameTDB has a pretty close to complete collection for US/EN covers. First pass at getting + // the cover will be by the disk's region, second will be the US cover, and third EN. else { Picasso.get() From fcb96a179ddcc2f49b3e8c3ed23bb2a6f61655fe Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 10:23:05 +0200 Subject: [PATCH 05/13] GameDetailsDialog: Actually load the banner --- .../org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index 133b1ef635..bceae90cbe 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -11,12 +11,11 @@ import androidx.fragment.app.DialogFragment; import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.squareup.picasso.Picasso; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.services.GameFileCacheService; +import org.dolphinemu.dolphinemu.utils.PicassoUtils; import de.hdodenhof.circleimageview.CircleImageView; @@ -77,7 +76,7 @@ public final class GameDetailsDialog extends DialogFragment .noPlaceholder() .into(imageGameScreen); - circleBanner.setImageResource(R.drawable.no_banner); + PicassoUtils.loadGameBanner(circleBanner, gameFile); builder.setView(contents); return builder.create(); From 100f032e2f7f7e0f6b2854b41b29d4d7f0c55b66 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 10:37:15 +0200 Subject: [PATCH 06/13] GameDetailsDialog: Don't use CircleImageView for banners Because trying to fit a 3:1 banner into a circle looks very awkward. Also move the banner below the title/description now that it takes up more space horizontally. --- Source/Android/app/build.gradle | 3 -- .../dolphinemu/dialogs/GameDetailsDialog.java | 6 ++-- .../main/res/layout/dialog_game_details.xml | 34 ++++++++----------- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index aa675a97b8..2cde9e0676 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -89,9 +89,6 @@ dependencies { // For REST calls implementation 'com.android.volley:volley:1.1.1' - // For showing the banner as a circle a-la Material Design Guidelines - implementation 'de.hdodenhof:circleimageview:2.1.0' - // For loading huge screenshots from the disk. implementation 'com.squareup.picasso:picasso:2.71828' diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index bceae90cbe..f5c355f046 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -17,8 +17,6 @@ import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.utils.PicassoUtils; -import de.hdodenhof.circleimageview.CircleImageView; - public final class GameDetailsDialog extends DialogFragment { private static final String ARG_GAME_PATH = "game_path"; @@ -44,7 +42,7 @@ public final class GameDetailsDialog extends DialogFragment .inflate(R.layout.dialog_game_details, null); final ImageView imageGameScreen = contents.findViewById(R.id.image_game_screen); - CircleImageView circleBanner = contents.findViewById(R.id.circle_banner); + ImageView banner = contents.findViewById(R.id.banner); TextView textTitle = contents.findViewById(R.id.text_game_title); TextView textDescription = contents.findViewById(R.id.text_description); @@ -76,7 +74,7 @@ public final class GameDetailsDialog extends DialogFragment .noPlaceholder() .into(imageGameScreen); - PicassoUtils.loadGameBanner(circleBanner, gameFile); + PicassoUtils.loadGameBanner(banner, gameFile); builder.setView(contents); return builder.create(); diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index 61cc212f55..2e8b4a7df7 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -4,23 +4,22 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:layout_width="match_parent" + android:paddingStart="24dp" + android:paddingEnd="24dp" android:transitionName="card_game"> - + android:layout_below="@+id/text_description" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + tools:src="@drawable/placeholder_banner"/> @@ -74,7 +69,7 @@ android:id="@+id/icon_country" android:layout_width="48dp" android:layout_height="48dp" - android:layout_alignStart="@+id/circle_banner" + android:layout_alignStart="@+id/banner" android:layout_alignTop="@+id/divider" android:layout_marginTop="24dp" android:padding="6dp" @@ -95,8 +90,9 @@ android:id="@+id/text_country" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_toEndOf="@+id/icon_country" android:layout_alignBottom="@+id/icon_country" - android:layout_alignStart="@+id/text_description" android:layout_alignTop="@+id/icon_country" android:gravity="center_vertical" tools:text="United States"/> From 100e7e2b3d40a2329c8cd9cc1394d12fe955b2ba Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 11:06:01 +0200 Subject: [PATCH 07/13] GameDetailsDialog: Hide description if empty In particular, Wii games don't have descriptions. --- .../dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index f5c355f046..42b0224088 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -2,6 +2,7 @@ package org.dolphinemu.dolphinemu.dialogs; import android.app.Dialog; import android.os.Bundle; +import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; @@ -53,9 +54,14 @@ public final class GameDetailsDialog extends DialogFragment FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch); String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()]; + String description = gameFile.getDescription(); textTitle.setText(gameFile.getTitle()); textDescription.setText(gameFile.getDescription()); + if (description.isEmpty()) + { + textDescription.setVisibility(View.GONE); + } textCountry.setText(country); textCompany.setText(gameFile.getCompany()); From 84e616337d7bee085546f7b7f1d037eea6d5312e Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 11:14:30 +0200 Subject: [PATCH 08/13] GameDetailsDialog: Remove the screenshot ImageView It takes up a lot of space on the screen, and the functionality for saving these screenshots isn't in Dolphin anymore as far as I can tell. --- .../dolphinemu/dialogs/GameDetailsDialog.java | 10 ---------- .../dolphinemu/dolphinemu/model/GameFile.java | 7 ------- .../main/res/layout/dialog_game_details.xml | 19 ++----------------- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index 42b0224088..f991e685f3 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -42,7 +42,6 @@ public final class GameDetailsDialog extends DialogFragment ViewGroup contents = (ViewGroup) getActivity().getLayoutInflater() .inflate(R.layout.dialog_game_details, null); - final ImageView imageGameScreen = contents.findViewById(R.id.image_game_screen); ImageView banner = contents.findViewById(R.id.banner); TextView textTitle = contents.findViewById(R.id.text_game_title); @@ -71,15 +70,6 @@ public final class GameDetailsDialog extends DialogFragment EmulationActivity.launch(getActivity(), gameFile); }); - // Fill in the view contents. - Picasso.get() - .load(getArguments().getString(gameFile.getScreenshotPath())) - .fit() - .centerCrop() - .noFade() - .noPlaceholder() - .into(imageGameScreen); - PicassoUtils.loadGameBanner(banner, gameFile); builder.setView(contents); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java index 70be6cd080..dea006f24e 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java @@ -54,11 +54,4 @@ public class GameFile { return getPath().substring(0, getPath().lastIndexOf(".")) + ".cover.png"; } - - public String getScreenshotPath() - { - String gameId = getGameId(); - return "file://" + Environment.getExternalStorageDirectory().getPath() + - "/dolphin-emu/ScreenShots/" + gameId + "/" + gameId + "-1.png"; - } } diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index 2e8b4a7df7..86db18e487 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -2,7 +2,7 @@ + android:layout_height="wrap_content"> - - @@ -111,7 +97,6 @@ android:id="@+id/button_launch" android:layout_width="56dp" android:layout_height="56dp" - android:layout_alignBottom="@+id/image_game_screen" android:layout_alignEnd="@+id/text_game_title" android:layout_marginBottom="-28dp" android:src="@drawable/ic_play" From ec91674d07ac1006ce128d27ec033ca64ca11908 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 16 Jun 2019 11:55:11 +0200 Subject: [PATCH 09/13] GameDetailsDialog: Show game ID and revision --- .../dolphinemu/dialogs/GameDetailsDialog.java | 4 ++ .../main/res/layout/dialog_game_details.xml | 42 ++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index f991e685f3..abd9aa367c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -49,6 +49,8 @@ public final class GameDetailsDialog extends DialogFragment TextView textCountry = contents.findViewById(R.id.text_country); TextView textCompany = contents.findViewById(R.id.text_company); + TextView textGameId = contents.findViewById(R.id.text_game_id); + TextView textRevision = contents.findViewById(R.id.text_revision); FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch); @@ -63,6 +65,8 @@ public final class GameDetailsDialog extends DialogFragment } textCountry.setText(country); textCompany.setText(gameFile.getCompany()); + textGameId.setText(gameFile.getGameId()); + textRevision.setText(Integer.toString(gameFile.getRevision())); buttonLaunch.setOnClickListener(view -> { diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index 86db18e487..f7f411cc6c 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -6,6 +6,7 @@ android:layout_width="match_parent" android:paddingStart="24dp" android:paddingEnd="24dp" + android:paddingBottom="24dp" android:transitionName="card_game"> + android:src="@drawable/ic_company"/> + + + + + + + + Date: Sun, 16 Jun 2019 12:04:06 +0200 Subject: [PATCH 10/13] GameDetailsDialog: Fix banner placeholder --- Source/Android/app/src/main/res/layout/dialog_game_details.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index f7f411cc6c..76fa954203 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -20,7 +20,7 @@ android:layout_below="@+id/text_description" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - tools:src="@drawable/placeholder_banner"/> + tools:src="@drawable/no_banner"/> Date: Mon, 21 Oct 2019 14:42:57 +0200 Subject: [PATCH 11/13] GameDetailsDialog: Convert layout to ConstraintLayout This also removes the FAB from GameDetailsDialog. It was previously outside of the visible area and thus unusable. --- Source/Android/app/build.gradle | 1 + .../dolphinemu/dialogs/GameDetailsDialog.java | 11 - .../main/res/layout/dialog_game_details.xml | 258 +++++++++--------- 3 files changed, 124 insertions(+), 146 deletions(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 2cde9e0676..711ae5050e 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -80,6 +80,7 @@ dependencies { implementation 'androidx.exifinterface:exifinterface:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.android.material:material:1.0.0' // Android TV UI libraries. diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index abd9aa367c..a0332d2bd4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -10,10 +10,7 @@ import android.widget.TextView; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; -import com.google.android.material.floatingactionbutton.FloatingActionButton; - import org.dolphinemu.dolphinemu.R; -import org.dolphinemu.dolphinemu.activities.EmulationActivity; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.utils.PicassoUtils; @@ -52,8 +49,6 @@ public final class GameDetailsDialog extends DialogFragment TextView textGameId = contents.findViewById(R.id.text_game_id); TextView textRevision = contents.findViewById(R.id.text_revision); - FloatingActionButton buttonLaunch = contents.findViewById(R.id.button_launch); - String country = getResources().getStringArray(R.array.countryNames)[gameFile.getCountry()]; String description = gameFile.getDescription(); @@ -68,12 +63,6 @@ public final class GameDetailsDialog extends DialogFragment textGameId.setText(gameFile.getGameId()); textRevision.setText(Integer.toString(gameFile.getRevision())); - buttonLaunch.setOnClickListener(view -> - { - // Start the emulation activity and send the path of the clicked ROM to it. - EmulationActivity.launch(getActivity(), gameFile); - }); - PicassoUtils.loadGameBanner(banner, gameFile); builder.setView(contents); diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index 76fa954203..bc88f4c59a 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -1,149 +1,137 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - + From 8e2b12e1ea5c06d5204376830cb30de91be643f1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 21 Oct 2019 15:10:39 +0200 Subject: [PATCH 12/13] GameDetailsDialog: Use labels instead of icons --- .../src/main/res/drawable-hdpi/ic_company.png | Bin 183 -> 0 bytes .../src/main/res/drawable-hdpi/ic_country.png | Bin 917 -> 0 bytes .../main/res/drawable-xhdpi/ic_company.png | Bin 136 -> 0 bytes .../main/res/drawable-xhdpi/ic_country.png | Bin 1220 -> 0 bytes .../main/res/drawable-xxhdpi/ic_company.png | Bin 196 -> 0 bytes .../main/res/drawable-xxhdpi/ic_country.png | Bin 1877 -> 0 bytes .../main/res/drawable-xxxhdpi/ic_company.png | Bin 142 -> 0 bytes .../main/res/drawable-xxxhdpi/ic_country.png | Bin 2537 -> 0 bytes .../main/res/layout/dialog_game_details.xml | 99 ++++++++++-------- .../app/src/main/res/values/strings.xml | 4 + 10 files changed, 58 insertions(+), 45 deletions(-) delete mode 100644 Source/Android/app/src/main/res/drawable-hdpi/ic_company.png delete mode 100644 Source/Android/app/src/main/res/drawable-hdpi/ic_country.png delete mode 100644 Source/Android/app/src/main/res/drawable-xhdpi/ic_company.png delete mode 100644 Source/Android/app/src/main/res/drawable-xhdpi/ic_country.png delete mode 100644 Source/Android/app/src/main/res/drawable-xxhdpi/ic_company.png delete mode 100644 Source/Android/app/src/main/res/drawable-xxhdpi/ic_country.png delete mode 100644 Source/Android/app/src/main/res/drawable-xxxhdpi/ic_company.png delete mode 100644 Source/Android/app/src/main/res/drawable-xxxhdpi/ic_country.png diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_company.png deleted file mode 100644 index 88e21de2951f8c75a828347cdc46201f4af2fae6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL0wmRZ7KH(+I!_nJkP61PH;#%nIPkCpczJ4O zYJH#LwA4bqB=-4P&c7#qDR45MF*x9H!)D)%Q#o=8t%)^hd){;Q&3woB?Em>2N?%%A z``8XPsA?#rMJ!l!-#YEn`8?5Y`_yYPul!!yoOIxmxIjo&NLIp%D=V(NbPLbr4QiZN huq2=|JN!U{?wQj09)I`l;sm;c!PC{xWt~$(69D*MNo)WB diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_country.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_country.png deleted file mode 100644 index 6e71c3a40f8044a380ce4fc88fbc6693d2b0d06b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmV;G18V$ z7F0kJv=5EOD346=i49p648UQ0LaSEl-{8N<||X@ z6$)6AQT0)3ycYk2vMDUL4$o=N@`%t^r;{x26x!x9x@Bsk*pyzn~}8?Bs(5RWA}x*Y>lM)oAi=k58+AXgQtR? zBug#nmYT^*GxZHJk!B|ysAP{IPeYbN>dYcWGFMzi#qnVt9{ygW4~CD_0pDQiWON}8yVw7jH`~y&)3^LS8E;% z&XS1W^f;){4SY@|qXW+srqz^qU#U~HJHET-f#(98HDrtu(pfk&X*SX!O7=+d^qNPx zf@X)*71AN~U%T#l3@D5Df=Z=<}!BXP2Hus7VCBEt|3cQ zKH$IP%(Na05g7HWiQ>3oS#%x+qI>D$f@&7_%)_V%=a{-q%78vNpn09N7d??WHZID1 rkP+q35be+w4N(^9;gz)S8&hN<`DB!If%1@K00000NkvXXu0mjffYiJw diff --git a/Source/Android/app/src/main/res/drawable-xhdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-xhdpi/ic_company.png deleted file mode 100644 index 26b1ccfcf4b93c66d381e88a1b5a660ece583080..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 136 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 diff --git a/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_country.png b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_country.png deleted file mode 100644 index 27c03a52325b4759b2755a62ad56e4130d87a902..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2537 zcmV?%@Gw@PvOfR~#MLN(3WIWR33|mdpj6Dk3s7O!lbDL+_yd%J1$ZASLV5$!;tS9i zyag3uy@-MF0jLG;f{K!^N5j|#l!|?j2NgyAj`c{6RX}ahpb>I4kxc48KGX0jZSyngVjiA!F}WQbO+fQe2qn;; zxDc)Xu{eXaDMt5FzkM_l+r$59(G}OCNZ9w(XaQP=V$sa|qSElKp62~>?jF7`;*n12 z@>wffCt4vW#N22AS|Gyn5Zdo%b24rB3u^4)y|(6EbMS8Mdf_<{qN$MvG*vLTzQ^o6 zY^oufw%uN)hy7^VA5m_%cF980H)PNa)ZyZC%%=UWEE zADQT8@;_=tEk4(zax&ts8CWB>U|C{773f0S8b{kTP*juc0OCth4-2dx zpm9@@Tr{11v!i9Q=J}tn0jNKekJZ~dpeuY0=wh#csv^(VfO1gD8=!SiKGzCwfFAcf zpa;DGs*hsd11dsoAt3(`Frt;_fbK{LKsT8J%0Ny+0QwziW`G7kC5ZZ%0opfV0PQdX zbbG=8y2T6-%SmnEHln5a&yZxOZ`=HSKF(jSKn*7IiPw8P{diN-;N{5j{02pd#jUPlh6Z90H})3 zw<2Vtq8t#d$?>fOwMwFb0UxWU91z#DVcAf3tCbCPcMEc9PeAc)={5k(grb^nyd^Ui z<-~X@(S6Tb1ShR2s)=?0rQmJNaapyEH}%expO;2`w05v;fM2QYtF|`v>bLdYV!SP! zhxpPxBOf{ruX~}WCfVCJpR7FzW1V3!XFjS3@84hxr6+qhj^#PKM^g-gqRK}P!=ouy ziTd6|?FV@{nxdZ>Ag)`WsJ_tNbdiRiJ^dG7A=cj_#rSZOtL>lu(gZo$A8dJz?L{6E z0KKT~8QL<3*R(4@_00isZG+P24x||j(DNL7z0_ckWYVlIKd-?8pcIE=L9at9wfvG+ z7gp2uSqu5DD_heYt{r&H>k(aCEgcqNuSFV9WE1VD?eS13m-*Q&+zF-8uV`fTkT(*S z@_|;4pe>EUqA!T%NZ2qD&$`sFIXh)5sVK39|ydVG&#u20ac4cFaknS%dD58JI> zAG|0^?M#lwq5n%oh>CGV>G864H7S70goiR`qk3u0>&?Q<*X(Fr8!;D!!biLu9saR6 zRdeq~f3~Y@4;}qaiypX9nA9x5rKdkN%rq zw?qj}39drD__&C67+#Gyo@dcFo~|-Z#w;H0S=Y;$5RaE(r(imsjle5;LY!QNP1FyU zhp9>}8yBF5KQ832f;D*5V#RDB?!!`AJQw?bi0WbuZbP=m5by>pBZa&128bvF{Q=yD zFI|1WKgCVhhF&B!8Sj9Is$me8<49bEhwvJ{#4pH25ekuuU+_6z!GpL0hhr)FqjL0~ zG6{hKKmnitPyi?Z6aWeU1%LttfC4}Pph)X)5Q-~-KQiM#00000NkvXXu0mjfy5F(v diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index bc88f4c59a..fc6b360320 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -51,87 +51,96 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/banner" /> - - + app:layout_constraintTop_toBottomOf="@id/label_country" /> - + app:layout_constraintTop_toBottomOf="@id/label_company" /> - + + + app:layout_constraintStart_toEndOf="@id/label_barrier" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBaseline_toBaselineOf="@id/label_country" /> + app:layout_constraintStart_toEndOf="@id/label_barrier" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBaseline_toBaselineOf="@id/label_company" /> + app:layout_constraintStart_toEndOf="@id/label_barrier" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBaseline_toBaselineOf="@id/label_game_id" /> + app:layout_constraintStart_toEndOf="@id/label_barrier" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBaseline_toBaselineOf="@id/label_revision" /> diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index c55de039a9..9cf77f7eba 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -284,6 +284,10 @@ Extension Bindings Junk Data Found The settings file for this game contains junk data created by an old version of Dolphin. Would you like to fix this by deleting the settings file for this game? All game-specific settings and cheats that you have added will be removed. This cannot be undone. + Country + Company + Game ID + Revision Take Screenshot From 9639dde1149e2d47ec4d7c5f36c2c25e13ae6901 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 21 Oct 2019 19:12:27 +0200 Subject: [PATCH 13/13] Address review comments on old code --- .../dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java index 81362404d1..b8c702f205 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GameBannerRequestHandler.java @@ -10,7 +10,7 @@ import org.dolphinemu.dolphinemu.model.GameFile; public class GameBannerRequestHandler extends RequestHandler { - private GameFile mGameFile; + private final GameFile mGameFile; public GameBannerRequestHandler(GameFile gameFile) {