diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java index 88fcd6a01175..ef7aca9f047d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java @@ -27,8 +27,7 @@ public enum MenuTag WIIMOTE_EXTENSION_1("wiimote_extension", 4), WIIMOTE_EXTENSION_2("wiimote_extension", 5), WIIMOTE_EXTENSION_3("wiimote_extension", 6), - WIIMOTE_EXTENSION_4("wiimote_extension", 7), - BLANK("Blank"); + WIIMOTE_EXTENSION_4("wiimote_extension", 7); private String tag; private int subType = -1; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java index d5f6754225e8..bfaf6daf80eb 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java @@ -105,13 +105,13 @@ public void onBackPressed() @Override public void showSettingsFragment(MenuTag menuTag, Bundle extras, boolean addToStack, - boolean customAnimations, String gameID) + String gameID) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); if (addToStack) { - if (areSystemAnimationsEnabled() && customAnimations) + if (areSystemAnimationsEnabled()) { transaction.setCustomAnimations( R.animator.settings_enter, diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.java index ebdcd9bdcd55..77ce9cee9cdf 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.java @@ -70,7 +70,7 @@ private void loadSettingsUI() } } - mView.showSettingsFragment(menuTag, null, false, true, gameId); + mView.showSettingsFragment(menuTag, null, false, gameId); mView.onSettingsFileLoaded(mSettings); } @@ -195,7 +195,7 @@ public void onGcPadSettingChanged(MenuTag key, int value) { Bundle bundle = new Bundle(); bundle.putInt(SettingsFragmentPresenter.ARG_CONTROLLER_TYPE, value / 6); - mView.showSettingsFragment(key, bundle, true, true, gameId); + mView.showSettingsFragment(key, bundle, true, gameId); } } @@ -204,7 +204,7 @@ public void onWiimoteSettingChanged(MenuTag menuTag, int value) switch (value) { case 1: - mView.showSettingsFragment(menuTag, null, true, true, gameId); + mView.showSettingsFragment(menuTag, null, true, gameId); break; case 2: @@ -219,7 +219,7 @@ public void onExtensionSettingChanged(MenuTag menuTag, int value) { Bundle bundle = new Bundle(); bundle.putInt(SettingsFragmentPresenter.ARG_CONTROLLER_TYPE, value); - mView.showSettingsFragment(menuTag, bundle, true, true, gameId); + mView.showSettingsFragment(menuTag, bundle, true, gameId); } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.java index 21ea87083914..71583aa98958 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.java @@ -14,12 +14,10 @@ public interface SettingsActivityView /** * Show a new SettingsFragment. * - * @param menuTag Identifier for the settings group that should be displayed. - * @param addToStack Whether or not this fragment should replace a previous one. - * @param customAnimations Custom animations are used if true while system animations are enabled. + * @param menuTag Identifier for the settings group that should be displayed. + * @param addToStack Whether or not this fragment should replace a previous one. */ - void showSettingsFragment(MenuTag menuTag, Bundle extras, boolean addToStack, - boolean customAnimations, String gameId); + void showSettingsFragment(MenuTag menuTag, Bundle extras, boolean addToStack, String gameId); /** * Called by a contained Fragment to get access to the Setting HashMap diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java index 04d68d17fcc5..f11a183626ec 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java @@ -55,6 +55,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter mSettings; @@ -72,6 +73,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter sl) sl.add(new FilePicker(SettingsFile.FILE_NAME_DOLPHIN, SettingsFile.KEY_WII_SD_CARD_PATH, Settings.SECTION_INI_GENERAL, R.string.SD_card_path, 0, getDefaultSDPath(), MainPresenter.REQUEST_SD_FILE, wiiSDCardPath)); - sl.add(new ConfirmRunnable(R.string.reset_paths, 0, R.string.reset_paths_confirmation, - R.string.reset_paths_complete, () -> SettingsAdapter.resetPaths())); + sl.add(new ConfirmRunnable(R.string.reset_paths, 0, R.string.reset_paths_confirmation, 0, + SettingsAdapter::resetPaths)); } private void addGameCubeSettings(ArrayList sl) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.java index 3fd8fca07ffa..eeff02d7dbea 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentView.java @@ -57,12 +57,6 @@ public interface SettingsFragmentView */ void loadSubMenu(MenuTag menuKey); - /** - * Show a new blank submenu and then immediately back out of it. - * Useful for updating dynamic setting descriptions. - */ - void reloadSubMenu(); - /** * Tell the Fragment to tell the containing activity to display a toast message. * diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java index f29173e8c9c3..32be613bc2fa 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java @@ -57,7 +57,6 @@ public void onClick(View clicked) { String alertTitle = mContext.getString(mItem.getNameId()); String alertText = mContext.getString(mItem.getAlertText()); - String confirmationText = mContext.getString(mItem.getConfirmationText()); AlertDialog.Builder builder = new AlertDialog.Builder(mContext) .setTitle(alertTitle) @@ -70,10 +69,13 @@ public void onClick(View clicked) if (mItem.getConfirmationText() > 0) { + String confirmationText = mContext.getString(mItem.getConfirmationText()); Toast.makeText(mContext, confirmationText, Toast.LENGTH_SHORT).show(); } dialog.dismiss(); - mView.reloadSubMenu(); + + // TODO: Remove finish and properly update dynamic settings descriptions. + mView.getActivity().finish(); }) .setNegativeButton("No", (dialog, whichButton) -> { diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index f1b6e062ba0d..df006410f172 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -172,7 +172,6 @@ SD Card Path Reset Paths to Default Settings Are you sure you want to reset Paths to default settings? - Paths reset General