Commit 588f2bfd authored by michael lundquist's avatar michael lundquist

Adding a failed, commented out attempt at setting the theme dynamically.

parent 6a2e5bce
Pipeline #3021 passed with stages
in 3 minutes and 30 seconds
......@@ -75,8 +75,21 @@ public class SettingsActivity extends AppCompatActivity {
MyApplication.setRotation(SettingsActivity.this);
}else if (key.equals("dark_theme")){
boolean dark = prefs.getBoolean("dark_theme", false);
// look at the udacity course. In this section you might want to reload,
// but this would mean every activity would have to set the right theme
/*
if(dark){
setTheme(R.style.darkTheme);
}else{
setTheme(R.style.AppTheme);
}
*/
String darkText = dark?"dark":"light";//TODO: remove this after you set the theme
Log.e("Mike's log", "onSharedPreferenceChanged: " + darkText);
finish();
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment