Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Android] Actually show the currently selected CPU core and video bac…
…kend within the settings screen.
- Loading branch information
Showing
5 changed files
with
58 additions
and
20 deletions.
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
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
33 changes: 33 additions & 0 deletions
33
Source/Android/src/org/dolphinemu/dolphinemu/settings/custom/UpdatingListPreference.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,33 @@ | ||
| package org.dolphinemu.dolphinemu.settings.custom; | ||
|
|
||
| import android.content.Context; | ||
| import android.preference.ListPreference; | ||
| import android.util.AttributeSet; | ||
|
|
||
| /** | ||
| * A {@link ListPreference} that updates its summary upon it's selection being changed. | ||
| */ | ||
| public final class UpdatingListPreference extends ListPreference | ||
| { | ||
| /** | ||
| * Constructor | ||
| * | ||
| * @param context the current {@link Context}. | ||
| */ | ||
| public UpdatingListPreference(Context context, AttributeSet attribs) | ||
| { | ||
| super(context, attribs); | ||
| } | ||
|
|
||
| @Override | ||
| public void onDialogClosed(boolean positiveResult) | ||
| { | ||
| super.onDialogClosed(positiveResult); | ||
|
|
||
| // If an entry was selected | ||
| if (positiveResult) | ||
| { | ||
| setSummary(getEntry()); | ||
| } | ||
| } | ||
| } |