From b76235a281f88ac3fb3235a06bb09baeb1c11d44 Mon Sep 17 00:00:00 2001 From: TwistedUmbrella Date: Tue, 21 Jan 2014 21:54:31 -0500 Subject: [PATCH] Place the rating as a subtext of the about to avoid irritation --- shell/android/res/values/strings.xml | 5 +-- .../src/com/reicast/emulator/FileBrowser.java | 32 -------------- .../com/reicast/emulator/MainActivity.java | 42 +++++++++++-------- 3 files changed, 25 insertions(+), 54 deletions(-) diff --git a/shell/android/res/values/strings.xml b/shell/android/res/values/strings.xml index 9ae30c207..3cf679265 100644 --- a/shell/android/res/values/strings.xml +++ b/shell/android/res/values/strings.xml @@ -43,11 +43,8 @@ Press any button on the controller to assign to port This controller is already in use! - Rate reicast - We are hard at work to bring the full Dreamcast experience to your Android device, so why not take a minute and tell us how you like it so far? We appreciate it! - About reicast - reicast is a dreamcast emulator\n\nVersion: + reicast is a dreamcast emulator\n\nVersion: %1$s\n\nWe are hard at work to bring the full Dreamcast experience to your Android device, so why not take a minute and tell us how you like it so far? We appreciate it! cdi diff --git a/shell/android/src/com/reicast/emulator/FileBrowser.java b/shell/android/src/com/reicast/emulator/FileBrowser.java index 6c97553e6..ad357c388 100644 --- a/shell/android/src/com/reicast/emulator/FileBrowser.java +++ b/shell/android/src/com/reicast/emulator/FileBrowser.java @@ -158,38 +158,6 @@ public class FileBrowser extends Fragment { if (!ImgBrowse) { navigate(sdcard); } else { - if (0 == 1) { - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( - parentActivity); - alertDialogBuilder.setTitle(getString(R.string.rating_title)); - alertDialogBuilder - .setMessage(getString(R.string.rating_text)) - .setCancelable(false) - .setPositiveButton("Rate It", - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, - int id) { - parentActivity.startActivity(new Intent( - Intent.ACTION_VIEW, - Uri.parse("market://details?id=" - + parentActivity - .getPackageName()))); - } - }) - .setNegativeButton("Dismiss", - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, - int id) { - - } - }); - - // create alert dialog - AlertDialog alertDialog = alertDialogBuilder.create(); - - // show it - alertDialog.show(); - } LocateGames mLocateGames = new LocateGames(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mLocateGames diff --git a/shell/android/src/com/reicast/emulator/MainActivity.java b/shell/android/src/com/reicast/emulator/MainActivity.java index 88c90981c..3aee9d7ee 100644 --- a/shell/android/src/com/reicast/emulator/MainActivity.java +++ b/shell/android/src/com/reicast/emulator/MainActivity.java @@ -480,26 +480,32 @@ public class MainActivity extends FragmentActivity implements e.printStackTrace(); } - // set dialog message - alertDialogBuilder - .setMessage( - getString(R.string.about_text) + " " + versionName) - .setCancelable(false) - .setPositiveButton("Dismiss", - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, - int id) { - // if this button is clicked, close - // current activity - // FileBrowser.this.finish(); - } - }); + alertDialogBuilder + .setMessage(getString(R.string.about_text, versionName)) + .setCancelable(false) + .setPositiveButton("Rate It", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int id) { + startActivity(new Intent( + Intent.ACTION_VIEW, + Uri.parse("market://details?id=" + + getPackageName()))); + } + }) + .setNegativeButton("Dismiss", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int id) { - // create alert dialog - AlertDialog alertDialog = alertDialogBuilder.create(); + } + }); - // show it - alertDialog.show(); + // create alert dialog + AlertDialog alertDialog = alertDialogBuilder.create(); + + // show it + alertDialog.show(); break; default: