mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Display summary line for license with current license text
Change-Id: Id7f524f46ef336046978766131b896f3147f0a54 GitHub: https://github.com/wikimedia/apps-android-commons/pull/19
This commit is contained in:
parent
48a2363051
commit
00c0ccea49
1 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import android.content.SharedPreferences;
|
|||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
|
||||
|
|
@ -26,6 +27,15 @@ public class SettingsActivity extends SherlockPreferenceActivity implements Shar
|
|||
Prefs.Licenses.CC_BY,
|
||||
Prefs.Licenses.CC_BY_SA
|
||||
});
|
||||
|
||||
licensePreference.setSummary(getString(Utils.licenseNameFor(licensePreference.getValue())));
|
||||
licensePreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
preference.setSummary(getString(Utils.licenseNameFor((String)newValue)));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
app = (CommonsApplication)getApplicationContext();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue