New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Rewrite settings UI. #3547
Merged
Sonicadvance1
merged 6 commits into
dolphin-emu:master
from
sigmabeta:android-config-rewrite
Jan 23, 2016
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e49f9b1
Implement Java-based Config file read/save
sigmabeta ce8a3d9
Implement basic framework for new Settings UI
sigmabeta c8e4008
Implement Seekbar dialog and SingleChoice dialog
sigmabeta d90dce6
Implement video settings + support for missing files / settings
sigmabeta cee84d8
Cleanup and documentation
sigmabeta 2190496
Fix special case for XFB & update EFB to match desktop
sigmabeta File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/SettingsActivity.java
This file was deleted.
Oops, something went wrong.
155 changes: 0 additions & 155 deletions
155
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/SettingsFragment.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...ce/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/BooleanSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.dolphinemu.dolphinemu.model.settings; | ||
|
||
public final class BooleanSetting extends Setting | ||
{ | ||
private boolean mValue; | ||
|
||
public BooleanSetting(String key, String section, boolean value) | ||
{ | ||
super(key, section); | ||
mValue = value; | ||
} | ||
|
||
public boolean getValue() | ||
{ | ||
return mValue; | ||
} | ||
|
||
public void setValue(boolean value) | ||
{ | ||
mValue = value; | ||
} | ||
|
||
@Override | ||
public String getValueAsString() | ||
{ | ||
return mValue ? "True" : "False"; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/FloatSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.dolphinemu.dolphinemu.model.settings; | ||
|
||
public final class FloatSetting extends Setting | ||
{ | ||
private float mValue; | ||
|
||
public FloatSetting(String key, String section, float value) | ||
{ | ||
super(key, section); | ||
mValue = value; | ||
} | ||
|
||
public float getValue() | ||
{ | ||
return mValue; | ||
} | ||
|
||
public void setValue(float value) | ||
{ | ||
mValue = value; | ||
} | ||
|
||
@Override | ||
public String getValueAsString() | ||
{ | ||
return Float.toString(mValue); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/IntSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.dolphinemu.dolphinemu.model.settings; | ||
|
||
public final class IntSetting extends Setting | ||
{ | ||
private int mValue; | ||
|
||
public IntSetting(String key, String section, int value) | ||
{ | ||
super(key, section); | ||
mValue = value; | ||
} | ||
|
||
public int getValue() | ||
{ | ||
return mValue; | ||
} | ||
|
||
public void setValue(int value) | ||
{ | ||
mValue = value; | ||
} | ||
|
||
@Override | ||
public String getValueAsString() | ||
{ | ||
return Integer.toString(mValue); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/settings/Setting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package org.dolphinemu.dolphinemu.model.settings; | ||
|
||
/** | ||
* Abstraction for a setting item as read from / written to Dolphin's configuration ini files. | ||
* These files generally consist of a key/value pair, though the type of value is ambiguous and | ||
* must be inferred at read-time. The type of value determines which child of this class is used | ||
* to represent the Setting. | ||
*/ | ||
public abstract class Setting | ||
{ | ||
private String mKey; | ||
private String mSection; | ||
|
||
/** | ||
* Base constructor. | ||
* | ||
* @param key Everything to the left of the = in a line from the ini file. | ||
* @param section The corresponding recent section header; e.g. [Core] or [Enhancements] without the brackets. | ||
*/ | ||
public Setting(String key, String section) | ||
{ | ||
mKey = key; | ||
mSection = section; | ||
} | ||
|
||
/** | ||
* | ||
* @return The identifier used to write this setting to the ini file. | ||
*/ | ||
public String getKey() | ||
{ | ||
return mKey; | ||
} | ||
|
||
/** | ||
* | ||
* @return The name of the header under which this Setting should be written in the ini file. | ||
*/ | ||
public String getSection() | ||
{ | ||
return mSection; | ||
} | ||
|
||
/** | ||
* @return A representation of this Setting's backing value converted to a String (e.g. for serialization). | ||
*/ | ||
public abstract String getValueAsString(); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as off-topic.
Sorry, something went wrong.