From 4a308ab6fba06d3fd58a371afd9e0f50f24f3cd7 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 15 Feb 2022 16:52:47 +0100 Subject: [PATCH] Enable dark mode by default --- .gitignore | 1 + .../main/java/org/communiquons/dccaggregator/MainActivity.kt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index aa724b7..5bd175f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .externalNativeBuild .cxx local.properties +.idea diff --git a/app/src/main/java/org/communiquons/dccaggregator/MainActivity.kt b/app/src/main/java/org/communiquons/dccaggregator/MainActivity.kt index e66aab3..662266f 100644 --- a/app/src/main/java/org/communiquons/dccaggregator/MainActivity.kt +++ b/app/src/main/java/org/communiquons/dccaggregator/MainActivity.kt @@ -2,10 +2,13 @@ package org.communiquons.dccaggregator import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import androidx.appcompat.app.AppCompatDelegate class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) + + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) } } \ No newline at end of file