Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
whats-open-android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open-android
Commits
588f2bfd
Commit
588f2bfd
authored
Sep 26, 2018
by
michael lundquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
app/src/main/java/srct/whatsopen/views/activities/SettingsActivity.java
...ava/srct/whatsopen/views/activities/SettingsActivity.java
+13
-0
No files found.
app/src/main/java/srct/whatsopen/views/activities/SettingsActivity.java
View file @
588f2bfd
...
@@ -75,8 +75,21 @@ public class SettingsActivity extends AppCompatActivity {
...
@@ -75,8 +75,21 @@ public class SettingsActivity extends AppCompatActivity {
MyApplication
.
setRotation
(
SettingsActivity
.
this
);
MyApplication
.
setRotation
(
SettingsActivity
.
this
);
}
else
if
(
key
.
equals
(
"dark_theme"
)){
}
else
if
(
key
.
equals
(
"dark_theme"
)){
boolean
dark
=
prefs
.
getBoolean
(
"dark_theme"
,
false
);
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
String
darkText
=
dark
?
"dark"
:
"light"
;
//TODO: remove this after you set the theme
Log
.
e
(
"Mike's log"
,
"onSharedPreferenceChanged: "
+
darkText
);
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