diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d68f421c..64f1e0af 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -292,6 +292,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/setup_theme.xml b/res/layout/setup_theme.xml
new file mode 100644
index 00000000..542e2473
--- /dev/null
+++ b/res/layout/setup_theme.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/raw/lineage_wizard_script.xml b/res/raw/lineage_wizard_script.xml
index 616f6ed8..733a4268 100644
--- a/res/raw/lineage_wizard_script.xml
+++ b/res/raw/lineage_wizard_script.xml
@@ -69,6 +69,10 @@
+
+
+
+
diff --git a/res/raw/lineage_wizard_script_user.xml b/res/raw/lineage_wizard_script_user.xml
index d4809013..a64035d3 100644
--- a/res/raw/lineage_wizard_script_user.xml
+++ b/res/raw/lineage_wizard_script_user.xml
@@ -36,6 +36,10 @@
+
+
+
+
diff --git a/res/raw/wizard_script.xml b/res/raw/wizard_script.xml
index 5310b9f7..67eabc2d 100644
--- a/res/raw/wizard_script.xml
+++ b/res/raw/wizard_script.xml
@@ -122,6 +122,9 @@
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index aa9dbb63..c8982f4d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -100,4 +100,10 @@
When location is on, download satellite assistance data from the internet, which can greatly improve the GPS startup performance.
+
+
+ Theme
+ Dark theme uses a black background to help keep battery alive longer on some screens
+ Dark
+ Light
diff --git a/src/org/lineageos/setupwizard/ThemeSettingsActivity.java b/src/org/lineageos/setupwizard/ThemeSettingsActivity.java
new file mode 100644
index 00000000..fe0c2bdd
--- /dev/null
+++ b/src/org/lineageos/setupwizard/ThemeSettingsActivity.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2023 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.lineageos.setupwizard;
+
+import android.app.UiModeManager;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.widget.RadioGroup;
+
+import androidx.annotation.Nullable;
+
+public class ThemeSettingsActivity extends BaseSetupWizardActivity {
+ public static final String TAG = ThemeSettingsActivity.class.getSimpleName();
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ getGlifLayout().setDescriptionText(getString(R.string.theme_summary));
+
+ UiModeManager uiModeManager = getSystemService(UiModeManager.class);
+ final RadioGroup radioGroup = findViewById(R.id.theme_radio_group);
+ radioGroup.check(((getResources().getConfiguration().uiMode
+ & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES)
+ ? R.id.radio_dark : R.id.radio_light);
+ radioGroup.setOnCheckedChangeListener((group, checkedId) -> {
+ switch (checkedId) {
+ case R.id.radio_dark:
+ uiModeManager.setNightModeActivated(true);
+ break;
+ case R.id.radio_light:
+ uiModeManager.setNightModeActivated(false);
+ break;
+ }
+ });
+ }
+
+ @Override
+ protected int getLayoutResId() {
+ return R.layout.setup_theme;
+ }
+
+ @Override
+ protected int getTitleResId() {
+ return R.string.setup_theme;
+ }
+
+ @Override
+ protected int getIconResId() {
+ return R.drawable.ic_theme;
+ }
+}