diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-10-25 21:05:42 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-10-25 21:05:42 -0400 |
| commit | c1ed54832c69d2ab4fdc877b9cba74e2a07d673b (patch) | |
| tree | ab1d252aeccd39f40f433bc85b6c6c541d0df08f /Source/Android | |
| parent | c8cf71c913bbd06f3e52a7fe66b01141976c7e34 (diff) | |
[Android] Maintain the chosen button layout when returning to the input overlay configuration menu.
- Also make the overlay configuration screen fullscreen for the app.
- Also force the overlay activity to be landscape, since this is the only orientation the EmulationActivity supports.
Diffstat (limited to 'Source/Android')
| -rw-r--r-- | Source/Android/AndroidManifest.xml | 12 | ||||
| -rw-r--r-- | Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputOverlayConfigButton.java | 17 |
2 files changed, 25 insertions, 4 deletions
diff --git a/Source/Android/AndroidManifest.xml b/Source/Android/AndroidManifest.xml index 5b2a3cfee9..5ecd07f5de 100644 --- a/Source/Android/AndroidManifest.xml +++ b/Source/Android/AndroidManifest.xml @@ -33,12 +33,16 @@ </intent-filter> </activity> - <activity android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity" /> + <activity android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity"/> - <activity android:name="org.dolphinemu.dolphinemu.emulation.EmulationActivity" - android:screenOrientation="landscape" /> + <activity + android:name="org.dolphinemu.dolphinemu.emulation.EmulationActivity" + android:screenOrientation="landscape" /> - <activity android:name="org.dolphinemu.dolphinemu.settings.input.InputOverlayConfigActivity"/> + <activity + android:name="org.dolphinemu.dolphinemu.settings.input.InputOverlayConfigActivity" + android:screenOrientation="landscape" + android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/> <activity android:name="org.dolphinemu.dolphinemu.settings.PrefsActivity" diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputOverlayConfigButton.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputOverlayConfigButton.java index 39ac957234..8d95800c62 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputOverlayConfigButton.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/input/InputOverlayConfigButton.java @@ -39,6 +39,23 @@ public final class InputOverlayConfigButton extends Button implements OnTouchLis // Get the SharedPreferences instance. sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); + + // String ID of this button. + final String buttonId = getResources().getResourceEntryName(getId()); + + // Check if this button has previous values set that aren't the default. + final float x = sharedPrefs.getFloat(buttonId+"-X", -1f); + final float y = sharedPrefs.getFloat(buttonId+"-Y", -1f); + + // If they are not -1, then they have a previous value set. + // Thus, we set those coordinate values. + // TODO: This is not always correct placement. Fix this. + // Likely something to do with the backing layout being a relative layout. + if (x != -1f && y != -1f) + { + setX(x); + setY(y); + } } @Override |
