mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Remove duplicate classes, move back theme preference
Also fix prefs to match arrays to remove spinner bug in SingleUploadFragment
This commit is contained in:
parent
0fe7a05731
commit
2ab5fa7ff6
5 changed files with 11 additions and 187 deletions
|
|
@ -7,8 +7,8 @@ public class Prefs {
|
|||
public static final String DEFAULT_LICENSE = "defaultLicense";
|
||||
|
||||
public static class Licenses {
|
||||
public static final String CC_BY_SA_3 = "CC BY-SA";
|
||||
public static final String CC_BY_3 = "CC BY";
|
||||
public static final String CC_BY_SA_3 = "CC BY-SA 3.0";
|
||||
public static final String CC_BY_3 = "CC BY 3.0";
|
||||
public static final String CC_BY_SA_4 = "CC BY-SA 4.0";
|
||||
public static final String CC_BY_4 = "CC BY 4.0";
|
||||
public static final String CC0 = "CC0";
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ public class SettingsFragment extends PreferenceFragment {
|
|||
|
||||
// Update spinner to show selected value as summary
|
||||
ListPreference licensePreference = (ListPreference) findPreference(Prefs.DEFAULT_LICENSE);
|
||||
licensePreference.setSummary(Utils.licenseNameFor(licensePreference.getValue()));
|
||||
licensePreference.setSummary(getString(Utils.licenseNameFor(licensePreference.getValue())));
|
||||
licensePreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
preference.setSummary(Utils.licenseNameFor((String) newValue));
|
||||
preference.setSummary(getString(Utils.licenseNameFor((String) newValue)));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue