Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-android
Commits
588f2bfd
Commit
588f2bfd
authored
Sep 26, 2018
by
michael lundquist
Browse files
Adding a failed, commented out attempt at setting the theme dynamically.
parent
6a2e5bce
Pipeline
#3021
passed with stages
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/srct/whatsopen/views/activities/SettingsActivity.java
View file @
588f2bfd
...
...
@@ -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
();
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment