From 4db472a2ea6a5eac792b2550bd0368e6098aae78 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Mon, 8 Mar 2021 12:11:19 -0500 Subject: [PATCH] android: Make dark-theme support official, in styles.xml. As Android's dark theme guide says is necessary [1]. Done now, to follow the template-app change in facebook/react-native@2b56011f9, on the path to the RN v0.64 upgrade. The RN commit contains other changes to the template app that we don't transfer to our project right now: - The placeholder App.js starts using `useColorScheme` [2], an API that was new in RN v0.62. We may want to use this API in some places, during or after #4009, but it doesn't seem necessary now. - On iOS, the root view defined in AppDelegate.m gets its `.backgroundColor` set to `[UIColor systemBackgroundColor]` when possible. That seems intended to vary the background with the system-set theme (dark or light). We don't want to make this change: we've so far decided to set `.loadingView` instead of `.backgroundColor`, and we do so in a way that explicitly doesn't change with the theme (it uses the brand color). - On iOS, the launch-screen storyboard is changed to adapt to the system-set theme. No need to make that change; we've so far chosen not to have it change with the theme, and just to use our brand color. [1] https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#support-dark-theme [2] https://reactnative.dev/docs/usecolorscheme --- android/app/src/main/res/values/styles.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 84ec7a2cd1f..11abd1ff8d0 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -