mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +01:00
Prepare xml files
This commit is contained in:
parent
5147769405
commit
23aa691275
15 changed files with 117 additions and 15 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package fr.free.nrw.commons;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -21,6 +22,13 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceState);
|
||||
//Check prefs on every activity starts
|
||||
if (getSharedPreferences("prefs", Context.MODE_PRIVATE).getBoolean("theme", false)) {
|
||||
setTheme(R.style.LightAppTheme);
|
||||
}else {
|
||||
setTheme(R.style.DarkAppTheme); //default
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
ListPreference licensePreference = (ListPreference) findPreference(Prefs.DEFAULT_LICENSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue