From e32f089763ada721a695e9f492dd871bfa2e947d Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Mon, 19 Oct 2020 14:35:48 -0700 Subject: [PATCH] android: Add a splash screen. Using `expo-splash-screen`'s Android-specific setup instructions [1], but with some important exceptions: - We don't (currently) intend to actually use `expo-splash-screen` [2], which means - Don't name a color "splashscreen_background". The API looks for that particular resource name. But we don't like its capitalization, which is inconsistent with the surrounding names [3]. - Don't use an image; we can add one later if we want. - Don't do anything marked "optional". - Don't go through a `splashscreen.xml` file; this extra indirection is unnecessary for us [4]. - Don't add an `android:theme="@style/AppTheme"` attribute to the `activity` element in our `AndroidManifest.xml`; it's redundant, with the same attribute already present in its parent `application` element. What's left is extremely small, and hard to describe, really, as "adding a splash screen". We're setting a background color, which will be what shows before our React elements have mounted and are showing. [1] https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-configure-android [2] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/React.20Navigation.20v5/near/1042794 [3] https://github.com/zulip/zulip-mobile/pull/4279#discussion_r508876726 [4] https://github.com/zulip/zulip-mobile/pull/4279#discussion_r508874575 Fixes: #2756 --- android/app/src/main/res/values/color.xml | 1 + android/app/src/main/res/values/styles.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/android/app/src/main/res/values/color.xml b/android/app/src/main/res/values/color.xml index 8899a9fae1b..a45863aca2f 100644 --- a/android/app/src/main/res/values/color.xml +++ b/android/app/src/main/res/values/color.xml @@ -2,4 +2,5 @@ #ffffff #d7ccc8 + #51c2af \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 84ec7a2cd1f..aa7abb86001 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -6,6 +6,7 @@ @color/primaryColor @color/primaryColorDark #000000 + @color/brand