From 3b28fe11d6414aeaedd7c47117b594250599016c Mon Sep 17 00:00:00 2001 From: Sean Maas Date: Fri, 21 Oct 2016 23:06:52 -0400 Subject: [PATCH 1/3] Android: Cleanup formatting --- .../dolphinemu/DolphinApplication.java | 1 - .../dolphinemu/dolphinemu/NativeLibrary.java | 2 - .../activities/EmulationActivity.java | 88 +++++++++---------- .../adapters/PlatformPagerAdapter.java | 6 +- .../adapters/SettingsRowPresenter.java | 3 +- .../dolphinemu/dialogs/GameDetailsDialog.java | 3 +- .../dolphinemu/dialogs/MotionAlertDialog.java | 2 +- .../fragments/EmulationFragment.java | 2 - .../dolphinemu/model/FileListItem.java | 1 - .../dolphinemu/model/TvSettingsItem.java | 1 - .../model/settings/view/CheckBoxSetting.java | 1 - .../model/settings/view/HeaderSetting.java | 1 - .../settings/view/SingleChoiceSetting.java | 1 - .../dolphinemu/overlay/InputOverlay.java | 37 ++++---- .../overlay/InputOverlayDrawableDpad.java | 4 +- .../dolphinemu/ui/DividerItemDecoration.java | 2 +- .../dolphinemu/ui/main/MainView.java | 1 - .../dolphinemu/ui/main/TvMainActivity.java | 2 +- .../ui/platform/PlatformGamesPresenter.java | 17 ++-- .../ui/platform/PlatformGamesView.java | 1 - .../ui/settings/SettingsActivity.java | 1 - .../settings/SettingsActivityPresenter.java | 68 +++++++------- .../ui/settings/SettingsAdapter.java | 4 +- .../settings/SettingsFragmentPresenter.java | 2 +- .../viewholder/CheckBoxSettingViewHolder.java | 1 - .../settings/viewholder/SliderViewHolder.java | 1 - .../utils/InputBindingPreference.java | 2 - .../org/dolphinemu/dolphinemu/utils/Log.java | 1 - .../viewholders/TvSettingsViewHolder.java | 1 - .../{anim => animator}/button_elevation.xml | 9 +- .../src/main/res/animator/menu_slide_in.xml | 3 + .../src/main/res/animator/menu_slide_out.xml | 27 +++--- .../src/main/res/animator/settings_enter.xml | 1 + .../src/main/res/animator/settings_exit.xml | 1 + .../main/res/animator/settings_pop_enter.xml | 1 + .../main/res/animator/setttings_pop_exit.xml | 1 + .../layout-television/fragment_emulation.xml | 3 +- .../res/layout/activity_add_directory.xml | 2 - .../main/res/layout/activity_emulation.xml | 3 +- .../app/src/main/res/layout/activity_main.xml | 2 +- .../src/main/res/layout/activity_tv_main.xml | 3 +- .../app/src/main/res/layout/card_game.xml | 4 +- .../main/res/layout/dialog_game_details.xml | 14 ++- .../app/src/main/res/layout/fragment_grid.xml | 4 +- .../main/res/layout/fragment_ingame_menu.xml | 18 ++-- .../res/layout/fragment_input_gc_list.xml | 13 ++- .../src/main/res/layout/fragment_settings.xml | 4 +- .../main/res/layout/fragment_state_load.xml | 35 ++++---- .../main/res/layout/fragment_state_save.xml | 35 ++++---- .../src/main/res/menu/menu_add_directory.xml | 2 + .../app/src/main/res/menu/menu_emulation.xml | 35 ++++---- .../src/main/res/menu/menu_emulation_wii.xml | 35 ++++---- .../app/src/main/res/menu/menu_game_grid.xml | 5 ++ .../app/src/main/res/menu/menu_settings.xml | 1 + .../app/src/main/res/values/arrays.xml | 29 +++--- .../app/src/main/res/values/colors.xml | 2 + .../app/src/main/res/values/strings.xml | 25 +++--- .../app/src/main/res/values/styles.xml | 29 +++--- 58 files changed, 290 insertions(+), 313 deletions(-) rename Source/Android/app/src/main/res/{anim => animator}/button_elevation.xml (84%) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/DolphinApplication.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/DolphinApplication.java index cea36e1c7a..e0eb5e5415 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/DolphinApplication.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/DolphinApplication.java @@ -4,7 +4,6 @@ import android.app.Application; import org.dolphinemu.dolphinemu.model.GameDatabase; - public class DolphinApplication extends Application { public static GameDatabase databaseHelper; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java index 248a806982..5449dc8ee2 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java @@ -6,7 +6,6 @@ package org.dolphinemu.dolphinemu; - import android.view.Surface; import android.widget.Toast; @@ -298,7 +297,6 @@ public final class NativeLibrary /** * Saves a screen capture of the game - * */ public static native void SaveScreenShot(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 2e77e9387e..131c95bc6f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -121,8 +121,7 @@ public final class EmulationActivity extends AppCompatActivity getSupportActionBar().hide(); } } - } - ); + }); } else { @@ -408,7 +407,8 @@ public final class EmulationActivity extends AppCompatActivity { // Edit the placement of the controls case R.id.menu_emulation_edit_layout: - EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager().findFragmentById(R.id.frame_emulation_fragment); + EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager() + .findFragmentById(R.id.frame_emulation_fragment); if (emulationFragment.isConfiguringControls()) { emulationFragment.stopConfiguringControls(); @@ -434,13 +434,13 @@ public final class EmulationActivity extends AppCompatActivity } builder.setMultiChoiceItems(R.array.gcpadButtons, enabledButtons, new DialogInterface.OnMultiChoiceClickListener() - { - @Override - public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) - { - editor.putBoolean("buttonToggleGc" + indexSelected, isChecked); - } - }); + { + @Override + public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) + { + editor.putBoolean("buttonToggleGc" + indexSelected, isChecked); + } + }); } else if (mPreferences.getInt("wiiController", 3) == 4) { @@ -450,13 +450,13 @@ public final class EmulationActivity extends AppCompatActivity } builder.setMultiChoiceItems(R.array.classicButtons, enabledButtons, new DialogInterface.OnMultiChoiceClickListener() - { - @Override - public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) - { - editor.putBoolean("buttonToggleClassic" + indexSelected, isChecked); - } - }); + { + @Override + public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) + { + editor.putBoolean("buttonToggleClassic" + indexSelected, isChecked); + } + }); } else { @@ -468,25 +468,25 @@ public final class EmulationActivity extends AppCompatActivity { builder.setMultiChoiceItems(R.array.nunchukButtons, enabledButtons, new DialogInterface.OnMultiChoiceClickListener() - { - @Override - public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) - { - editor.putBoolean("buttonToggleWii" + indexSelected, isChecked); - } - }); + { + @Override + public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) + { + editor.putBoolean("buttonToggleWii" + indexSelected, isChecked); + } + }); } else { builder.setMultiChoiceItems(R.array.wiimoteButtons, enabledButtons, new DialogInterface.OnMultiChoiceClickListener() - { - @Override - public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) - { - editor.putBoolean("buttonToggleWii" + indexSelected, isChecked); - } - }); + { + @Override + public void onClick(DialogInterface dialog, int indexSelected, boolean isChecked) + { + editor.putBoolean("buttonToggleWii" + indexSelected, isChecked); + } + }); } } builder.setNeutralButton(getString(R.string.emulation_toggle_all), new DialogInterface.OnClickListener() @@ -499,7 +499,7 @@ public final class EmulationActivity extends AppCompatActivity emulationFragment.toggleInputOverlayVisibility(); } }); - builder.setPositiveButton(getString(R.string.emulation_done), new DialogInterface.OnClickListener() + builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) @@ -552,7 +552,7 @@ public final class EmulationActivity extends AppCompatActivity AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.emulation_control_scale); builder.setView(view); - builder.setPositiveButton(getString(R.string.emulation_done), new DialogInterface.OnClickListener() + builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) @@ -580,17 +580,17 @@ public final class EmulationActivity extends AppCompatActivity builder.setTitle(R.string.emulation_choose_controller); builder.setSingleChoiceItems(R.array.controllersEntries, mPreferences.getInt("wiiController", 3), new DialogInterface.OnClickListener() - { - @Override - public void onClick(DialogInterface dialog, int indexSelected) - { - editor.putInt("wiiController", indexSelected); + { + @Override + public void onClick(DialogInterface dialog, int indexSelected) + { + editor.putInt("wiiController", indexSelected); - NativeLibrary.SetConfig("WiimoteNew.ini", "Wiimote1", "Extension", - getResources().getStringArray(R.array.controllersValues)[indexSelected]); - } - }); - builder.setPositiveButton(getString(R.string.emulation_done), new DialogInterface.OnClickListener() + NativeLibrary.SetConfig("WiimoteNew.ini", "Wiimote1", "Extension", + getResources().getStringArray(R.array.controllersValues)[indexSelected]); + } + }); + builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) @@ -619,7 +619,7 @@ public final class EmulationActivity extends AppCompatActivity NativeLibrary.SaveScreenShot(); return; - // Quicksave / Load + // Quick save / load case R.id.menu_quicksave: NativeLibrary.SaveState(9); return; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java index a98fb246c4..8972ac95bd 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.adapters; - import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; @@ -17,10 +16,11 @@ public class PlatformPagerAdapter extends FragmentPagerAdapter { private Context mContext; - private final static int[] TAB_ICONS = { + private final static int[] TAB_ICONS = + { R.drawable.ic_gamecube, R.drawable.ic_wii, - R.drawable.ic_folder// wiiware TODO Have an icon here. + R.drawable.ic_folder // WiiWare TODO Have an icon here. }; public PlatformPagerAdapter(FragmentManager fm, Context context) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java index beef06a218..9a75fe9301 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.adapters; - import android.content.res.Resources; import android.support.v17.leanback.widget.ImageCardView; import android.support.v17.leanback.widget.Presenter; @@ -44,4 +43,4 @@ public final class SettingsRowPresenter extends Presenter { // no op } -} \ No newline at end of file +} 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 714db42e9f..5b351478d2 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,6 +1,5 @@ package org.dolphinemu.dolphinemu.dialogs; - import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; @@ -63,7 +62,7 @@ public final class GameDetailsDialog extends DialogFragment FloatingActionButton buttonLaunch = (FloatingActionButton) contents.findViewById(R.id.button_launch); int countryIndex = getArguments().getInt(ARGUMENT_GAME_COUNTRY); - String country = getResources().getStringArray(R.array.country_names)[countryIndex]; + String country = getResources().getStringArray(R.array.countryNames)[countryIndex]; textTitle.setText(getArguments().getString(ARGUMENT_GAME_TITLE)); textDescription.setText(getArguments().getString(ARGUMENT_GAME_DESCRIPTION)); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java index dd16ca8af3..bb83a7f1ae 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java @@ -175,4 +175,4 @@ public final class MotionAlertDialog extends AlertDialog dismiss(); } -} \ No newline at end of file +} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java index b70196a773..7066b34c65 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java @@ -18,7 +18,6 @@ import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.overlay.InputOverlay; import org.dolphinemu.dolphinemu.utils.Log; - public final class EmulationFragment extends Fragment implements SurfaceHolder.Callback { public static final String FRAGMENT_TAG = BuildConfig.APPLICATION_ID + ".emulation_fragment"; @@ -36,7 +35,6 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C private boolean mEmulationStarted; private boolean mEmulationRunning; - public static EmulationFragment newInstance(String path) { EmulationFragment fragment = new EmulationFragment(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java index ac37df37bd..057432b8a2 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.model; - import org.dolphinemu.dolphinemu.NativeLibrary; import java.io.File; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/TvSettingsItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/TvSettingsItem.java index ccd87bfa4c..f53e2dc39d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/TvSettingsItem.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/TvSettingsItem.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.model; - public final class TvSettingsItem { private final int mItemId; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/CheckBoxSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/CheckBoxSetting.java index adc19f8c30..4f8e3b4045 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/CheckBoxSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/CheckBoxSetting.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.model.settings.view; - import org.dolphinemu.dolphinemu.model.settings.BooleanSetting; import org.dolphinemu.dolphinemu.model.settings.Setting; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/HeaderSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/HeaderSetting.java index 2d5744c555..82e0486229 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/HeaderSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/HeaderSetting.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.model.settings.view; - import org.dolphinemu.dolphinemu.model.settings.Setting; public final class HeaderSetting extends SettingsItem diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/SingleChoiceSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/SingleChoiceSetting.java index 07880587c2..65d725369a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/SingleChoiceSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/view/SingleChoiceSetting.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.model.settings.view; - import org.dolphinemu.dolphinemu.model.settings.IntSetting; import org.dolphinemu.dolphinemu.model.settings.Setting; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java index 1481faaa70..6c75e55544 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java @@ -33,7 +33,7 @@ import java.util.Set; /** * Draws the interactive input overlay on top of the - * {@link NativeGLSurfaceView} that is rendering emulation. + * {@link SurfaceView} that is rendering emulation. */ public final class InputOverlay extends SurfaceView implements OnTouchListener { @@ -215,8 +215,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener int fingerPositionX = (int)event.getX(pointerIndex); int fingerPositionY = (int)event.getY(pointerIndex); - //Maybe combine Button and Joystick as subclasses of the same parent? - //Or maybe create an interface like IMoveableHUDControl? + // Maybe combine Button and Joystick as subclasses of the same parent? + // Or maybe create an interface like IMoveableHUDControl? for (InputOverlayDrawableButton button : overlayButtons) { @@ -245,7 +245,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener case MotionEvent.ACTION_POINTER_UP: if (mButtonBeingConfigured == button) { - //Persist button position by saving new place. + // Persist button position by saving new place. saveControlPosition(mButtonBeingConfigured.getId(), mButtonBeingConfigured.getBounds().left, mButtonBeingConfigured.getBounds().top); mButtonBeingConfigured = null; } @@ -280,7 +280,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener case MotionEvent.ACTION_POINTER_UP: if (mDpadBeingConfigured == dpad) { - //Persist button position by saving new place. + // Persist button position by saving new place. saveControlPosition(mDpadBeingConfigured.getId(0), mDpadBeingConfigured.getBounds().left, mDpadBeingConfigured.getBounds().top); mDpadBeingConfigured = null; } @@ -638,8 +638,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener // The X and Y coordinates of the InputOverlayDrawableButton on the InputOverlay. // These were set in the input overlay configuration menu. - int drawableX = (int) sPrefs.getFloat(buttonId+"-X", 0f); - int drawableY = (int) sPrefs.getFloat(buttonId+"-Y", 0f); + int drawableX = (int) sPrefs.getFloat(buttonId + "-X", 0f); + int drawableY = (int) sPrefs.getFloat(buttonId + "-Y", 0f); // Intrinsic width and height of the InputOverlayDrawableButton. // For any who may not know, intrinsic width/height @@ -649,7 +649,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener // Now set the bounds for the InputOverlayDrawableButton. // This will dictate where on the screen (and the what the size) the InputOverlayDrawableButton will be. - overlayDrawable.setBounds(drawableX, drawableY, drawableX+intrinWidth, drawableY+intrinHeight); + overlayDrawable.setBounds(drawableX, drawableY, drawableX + intrinWidth, drawableY + intrinHeight); // Need to set the image's position overlayDrawable.setPosition(drawableX, drawableY); @@ -660,12 +660,12 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener /** * Initializes an {@link InputOverlayDrawableDpad} * - * @param context The current {@link Context}. - * @param resId The resource ID of the {@link Drawable} to get the {@link Bitmap} of. - * @param buttonUp Identifier for the up button. + * @param context The current {@link Context}. + * @param resId The resource ID of the {@link Drawable} to get the {@link Bitmap} of. + * @param buttonUp Identifier for the up button. * @param buttonDown Identifier for the down button. * @param buttonLeft Identifier for the left button. - * @param buttonRight Identifier for the right button. + * @param buttonRight Identifier for the right button. * * @return the initialized {@link InputOverlayDrawableDpad} */ @@ -705,8 +705,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener // The X and Y coordinates of the InputOverlayDrawableDpad on the InputOverlay. // These were set in the input overlay configuration menu. - int drawableX = (int) sPrefs.getFloat(buttonUp+"-X", 0f); - int drawableY = (int) sPrefs.getFloat(buttonUp+"-Y", 0f); + int drawableX = (int) sPrefs.getFloat(buttonUp + "-X", 0f); + int drawableY = (int) sPrefs.getFloat(buttonUp + "-Y", 0f); // Intrinsic width and height of the InputOverlayDrawableDpad. // For any who may not know, intrinsic width/height @@ -716,7 +716,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener // Now set the bounds for the InputOverlayDrawableDpad. // This will dictate where on the screen (and the what the size) the InputOverlayDrawableDpad will be. - overlayDrawable.setBounds(drawableX, drawableY, drawableX+intrinWidth, drawableY+intrinHeight); + overlayDrawable.setBounds(drawableX, drawableY, drawableX + intrinWidth, drawableY + intrinHeight); // Need to set the image's position overlayDrawable.setPosition(drawableX, drawableY); @@ -730,7 +730,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener * @param context The current {@link Context} * @param resOuter Resource ID for the outer image of the joystick (the static image that shows the circular bounds). * @param resInner Resource ID for the inner image of the joystick (the one you actually move around). - * @param joystick Identifier for which joystick this is. + * @param joystick Identifier for which joystick this is. * * @return the initialized {@link InputOverlayDrawableJoystick}. */ @@ -753,8 +753,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener // The X and Y coordinates of the InputOverlayDrawableButton on the InputOverlay. // These were set in the input overlay configuration menu. - int drawableX = (int) sPrefs.getFloat(joystick+"-X", 0f); - int drawableY = (int) sPrefs.getFloat(joystick+"-Y", 0f); + int drawableX = (int) sPrefs.getFloat(joystick + "-X", 0f); + int drawableY = (int) sPrefs.getFloat(joystick + "-Y", 0f); // Decide inner scale based on joystick ID float innerScale; @@ -797,5 +797,4 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener { return mIsInEditMode; } - } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayDrawableDpad.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayDrawableDpad.java index 7c1584e529..e0ae7b6a52 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayDrawableDpad.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayDrawableDpad.java @@ -29,10 +29,10 @@ public final class InputOverlayDrawableDpad extends BitmapDrawable * * @param res {@link Resources} instance. * @param bitmap {@link Bitmap} to use with this Drawable. - * @param buttonUp Identifier for the up button. + * @param buttonUp Identifier for the up button. * @param buttonDown Identifier for the down button. * @param buttonLeft Identifier for the left button. - * @param buttonRight Identifier for the right button. + * @param buttonRight Identifier for the right button. */ public InputOverlayDrawableDpad(Resources res, Bitmap bitmap, int buttonUp, int buttonDown, diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java index fcd0befdc2..252d3886a4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java @@ -154,4 +154,4 @@ public final class DividerItemDecoration extends RecyclerView.ItemDecoration "DividerItemDecoration can only be used with a LinearLayoutManager."); } } -} \ No newline at end of file +} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainView.java index 12c8ae832c..5fa0368ee8 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainView.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainView.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.ui.main; - import android.database.Cursor; /** diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java index c4f753edbd..a003603b1a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java @@ -250,7 +250,7 @@ public final class TvMainActivity extends Activity implements MainView R.string.grid_menu_refresh)); // Create a header for this row. - HeaderItem header = new HeaderItem(R.string.settings, getString(R.string.settings)); + HeaderItem header = new HeaderItem(R.string.preferences_settings, getString(R.string.preferences_settings)); return new ListRow(header, rowItems); } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesPresenter.java index 5dda2e5535..403ba4ef18 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesPresenter.java @@ -48,15 +48,14 @@ public final class PlatformGamesPresenter .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1() - { - @Override - public void call(Cursor games) - { - Log.debug("[PlatformGamesPresenter] " + mPlatform + ": Load finished, swapping cursor..."); + { + @Override + public void call(Cursor games) + { + Log.debug("[PlatformGamesPresenter] " + mPlatform + ": Load finished, swapping cursor..."); - mView.showGames(games); - } - } - ); + mView.showGames(games); + } + }); } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesView.java index 9c05534bd5..361d16dfbc 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesView.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesView.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.ui.platform; - import android.database.Cursor; /** diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivity.java index 2ba41846b9..976c808c4a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivity.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.ui.settings; - import android.app.FragmentTransaction; import android.content.Context; import android.content.Intent; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivityPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivityPresenter.java index 7aea8c88d0..67de37c546 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivityPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsActivityPresenter.java @@ -1,6 +1,5 @@ package org.dolphinemu.dolphinemu.ui.settings; - import android.os.Bundle; import org.dolphinemu.dolphinemu.BuildConfig; @@ -58,23 +57,23 @@ public final class SettingsActivityPresenter .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1>() - { - @Override - public void call(HashMap settingsBySection) - { - mSettingsBySection = settingsBySection; - mView.onSettingsFileLoaded(settingsBySection); - } - }, - new Action1() - { - @Override - public void call(Throwable throwable) - { - Log.error("[SettingsActivityPresenter] Error reading file " + filename + ".ini: "+ throwable.getMessage()); - mView.onSettingsFileNotFound(); - } - }); + { + @Override + public void call(HashMap settingsBySection) + { + mSettingsBySection = settingsBySection; + mView.onSettingsFileLoaded(settingsBySection); + } + }, + new Action1() + { + @Override + public void call(Throwable throwable) + { + Log.error("[SettingsActivityPresenter] Error reading file " + filename + ".ini: "+ throwable.getMessage()); + mView.onSettingsFileNotFound(); + } + }); } else { @@ -100,23 +99,22 @@ public final class SettingsActivityPresenter SettingsFile.saveFile(mFileName, mSettingsBySection) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe( - new Action1() - { - @Override - public void call(Boolean aBoolean) - { - mView.showToastMessage("Saved successfully to " + mFileName + ".ini"); - } - }, - new Action1() - { - @Override - public void call(Throwable throwable) - { - mView.showToastMessage("Error saving " + mFileName + ".ini: " + throwable.getMessage()); - } - }); + .subscribe(new Action1() + { + @Override + public void call(Boolean aBoolean) + { + mView.showToastMessage("Saved successfully to " + mFileName + ".ini"); + } + }, + new Action1() + { + @Override + public void call(Throwable throwable) + { + mView.showToastMessage("Error saving " + mFileName + ".ini: " + throwable.getMessage()); + } + }); } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java index 235e43ee63..de8149cc07 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java @@ -158,8 +158,8 @@ public final class SettingsAdapter extends RecyclerView.Adapter - + + + + - \ No newline at end of file + + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/animator/menu_slide_in.xml b/Source/Android/app/src/main/res/animator/menu_slide_in.xml index e6f9ae6d8e..fff198cb47 100644 --- a/Source/Android/app/src/main/res/animator/menu_slide_in.xml +++ b/Source/Android/app/src/main/res/animator/menu_slide_in.xml @@ -1,5 +1,6 @@ + + + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/animator/menu_slide_out.xml b/Source/Android/app/src/main/res/animator/menu_slide_out.xml index 85c2556e48..88f300280a 100644 --- a/Source/Android/app/src/main/res/animator/menu_slide_out.xml +++ b/Source/Android/app/src/main/res/animator/menu_slide_out.xml @@ -1,18 +1,21 @@ + + android:propertyName="translationX" + android:valueType="floatType" + android:valueFrom="0" + android:valueTo="1280" + android:interpolator="@android:interpolator/decelerate_quad" + android:duration="300"/> + + android:propertyName="alpha" + android:valueType="floatType" + android:valueFrom="1" + android:valueTo="0" + android:interpolator="@android:interpolator/decelerate_quad" + android:duration="300"/> + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/animator/settings_enter.xml b/Source/Android/app/src/main/res/animator/settings_enter.xml index 1e180ca6bc..23ba7b802b 100644 --- a/Source/Android/app/src/main/res/animator/settings_enter.xml +++ b/Source/Android/app/src/main/res/animator/settings_enter.xml @@ -24,4 +24,5 @@ android:startOffset="@android:integer/config_shortAnimTime" android:valueFrom="100.0" android:valueTo="0"/> + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/animator/settings_exit.xml b/Source/Android/app/src/main/res/animator/settings_exit.xml index f5480541a9..fece2c34ea 100644 --- a/Source/Android/app/src/main/res/animator/settings_exit.xml +++ b/Source/Android/app/src/main/res/animator/settings_exit.xml @@ -24,4 +24,5 @@ android:startOffset="@android:integer/config_shortAnimTime" android:valueFrom="0" android:valueTo="-100.0"/> + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/animator/settings_pop_enter.xml b/Source/Android/app/src/main/res/animator/settings_pop_enter.xml index f61efac611..36c8a27e7a 100644 --- a/Source/Android/app/src/main/res/animator/settings_pop_enter.xml +++ b/Source/Android/app/src/main/res/animator/settings_pop_enter.xml @@ -1,5 +1,6 @@ + + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/layout-television/fragment_emulation.xml b/Source/Android/app/src/main/res/layout-television/fragment_emulation.xml index 787de65186..276f5ad133 100644 --- a/Source/Android/app/src/main/res/layout-television/fragment_emulation.xml +++ b/Source/Android/app/src/main/res/layout-television/fragment_emulation.xml @@ -11,4 +11,5 @@ android:layout_width="match_parent" android:focusable="false" android:focusableInTouchMode="false"/> - + + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/layout/activity_add_directory.xml b/Source/Android/app/src/main/res/layout/activity_add_directory.xml index 3308cbe028..b52a9b5187 100644 --- a/Source/Android/app/src/main/res/layout/activity_add_directory.xml +++ b/Source/Android/app/src/main/res/layout/activity_add_directory.xml @@ -14,7 +14,6 @@ android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar" android:elevation="6dp"/> - - \ No newline at end of file diff --git a/Source/Android/app/src/main/res/layout/activity_emulation.xml b/Source/Android/app/src/main/res/layout/activity_emulation.xml index 9e4e84e151..3aa230a070 100644 --- a/Source/Android/app/src/main/res/layout/activity_emulation.xml +++ b/Source/Android/app/src/main/res/layout/activity_emulation.xml @@ -1,8 +1,7 @@ + android:id="@+id/frame_content"> - + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/layout/activity_tv_main.xml b/Source/Android/app/src/main/res/layout/activity_tv_main.xml index 922d874b02..fd1573f5c4 100644 --- a/Source/Android/app/src/main/res/layout/activity_tv_main.xml +++ b/Source/Android/app/src/main/res/layout/activity_tv_main.xml @@ -7,7 +7,6 @@ android:name="android.support.v17.leanback.app.BrowseFragment" android:id="@+id/fragment_game_list" android:layout_width="match_parent" - android:layout_height="match_parent" - /> + android:layout_height="match_parent"/> \ No newline at end of file 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 8830d4ea1d..f831b01f3d 100644 --- a/Source/Android/app/src/main/res/layout/card_game.xml +++ b/Source/Android/app/src/main/res/layout/card_game.xml @@ -1,5 +1,4 @@ - + android:foreground="?android:attr/selectableItemBackground"> + app:civ_border_width="2dp"/> + tools:text="Zany rhythm action!"/> + app:pressedTranslationZ="12dp"/> + - diff --git a/Source/Android/app/src/main/res/layout/fragment_grid.xml b/Source/Android/app/src/main/res/layout/fragment_grid.xml index 3711602198..f7fbcc6427 100644 --- a/Source/Android/app/src/main/res/layout/fragment_grid.xml +++ b/Source/Android/app/src/main/res/layout/fragment_grid.xml @@ -2,8 +2,7 @@ + android:layout_height="match_parent"> + \ No newline at end of file diff --git a/Source/Android/app/src/main/res/layout/fragment_ingame_menu.xml b/Source/Android/app/src/main/res/layout/fragment_ingame_menu.xml index e218fac5b5..4bf4e6193f 100644 --- a/Source/Android/app/src/main/res/layout/fragment_ingame_menu.xml +++ b/Source/Android/app/src/main/res/layout/fragment_ingame_menu.xml @@ -5,8 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/dolphin_blue_dark" - tools:layout_width="250dp" - > + tools:layout_width="250dp"> + android:layout_weight="1">