]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java
Create a dark theme for `AboutActivity`.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / AboutActivity.java
index 2251736b0ea7e95e720b9fd4ae0d5c9008e52d32..8244774e30240a27b87a90865be1b6f278350915 100644 (file)
@@ -35,8 +35,22 @@ import com.stoutner.privacybrowser.R;
 public class AboutActivity extends AppCompatActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        // Set the theme.
+        if (MainWebViewActivity.darkTheme) {
+            setTheme(R.style.PrivacyBrowserDark_SecondaryActivity);
+        } else {
+            setTheme(R.style.PrivacyBrowserLight_SecondaryActivity);
+        }
+
+        // Run the default commands.
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.about_coordinatorlayout);
+
+        // Set the content view according to the theme.
+        if (MainWebViewActivity.darkTheme) {
+            setContentView(R.layout.about_coordinatorlayout_dark);
+        } else {
+            setContentView(R.layout.about_coordinatorlayout_light);
+        }
 
         // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
         Toolbar aboutAppBar = (Toolbar) findViewById(R.id.about_toolbar);