Commit 0504c4d1 authored by michael lundquist's avatar michael lundquist
Browse files

Detecting a click on the dark/light theme toggle.

parent f61b0c0e
Pipeline #2934 passed with stages
in 3 minutes and 32 seconds
......@@ -7,6 +7,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
......@@ -72,6 +73,10 @@ public class SettingsActivity extends AppCompatActivity {
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
if(key.equals("turn_off_rotation_preference")) {
}else if (key.equals("dark_theme")){
boolean dark = prefs.getBoolean("dark_theme", false);
String darkText = dark?"dark":"light";//TODO: remove this after you set the theme
Log.e("Mike's log", "onSharedPreferenceChanged: " + darkText);
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