Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: add splashscreen for day/night mode

ammarahm-ed5ddc2630e3a1
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-anydpi-v26/logo_dark.xml b/apps/mobile/native/android/app/src/main/res/mipmap-anydpi-v26/logo_dark.xml
new file mode 100644
index 000000000..1130d2378
--- /dev/null
+++ b/apps/mobile/native/android/app/src/main/res/mipmap-anydpi-v26/logo_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/logo_dark_background"/>
+ <foreground android:drawable="@mipmap/logo_dark_foreground"/>
+</adaptive-icon>
\ No newline at end of file
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark.png b/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark.png
new file mode 100644
index 000000000..c0a4bd556
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark_foreground.png b/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark_foreground.png
new file mode 100644
index 000000000..8c7a5cb2d
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-hdpi/logo_dark_foreground.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark.png b/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark.png
new file mode 100644
index 000000000..8acc9cbc9
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark_foreground.png b/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark_foreground.png
new file mode 100644
index 000000000..0cfcfb140
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-mdpi/logo_dark_foreground.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark.png b/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark.png
new file mode 100644
index 000000000..7e935ebcf
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark_foreground.png b/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark_foreground.png
new file mode 100644
index 000000000..40a3d6941
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xhdpi/logo_dark_foreground.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark.png b/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark.png
new file mode 100644
index 000000000..ba9b966ab
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark_foreground.png b/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark_foreground.png
new file mode 100644
index 000000000..5e2d6115e
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xxhdpi/logo_dark_foreground.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark.png b/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark.png
new file mode 100644
index 000000000..a210377c4
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark_foreground.png b/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark_foreground.png
new file mode 100644
index 000000000..9fc077b69
Binary files /dev/null and b/apps/mobile/native/android/app/src/main/res/mipmap-xxxhdpi/logo_dark_foreground.png differ
diff --git a/apps/mobile/native/android/app/src/main/res/values-night/styles.xml b/apps/mobile/native/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 000000000..7e653e613
--- /dev/null
+++ b/apps/mobile/native/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,8 @@
+<resources>
+ <!-- BootTheme should inherit from Theme.SplashScreen -->
+ <style name="BootTheme" parent="Theme.SplashScreen">
+ <item name="windowSplashScreenBackground">@color/bootsplash_background_dark</item>
+ <item name="windowSplashScreenAnimatedIcon">@mipmap/logo_dark</item>
+ <item name="postSplashScreenTheme">@style/AppTheme</item>
+ </style>
+</resources>
\ No newline at end of file
diff --git a/apps/mobile/native/android/app/src/main/res/values/colors.xml b/apps/mobile/native/android/app/src/main/res/values/colors.xml
index eeefb4b76..e08485171 100644
--- a/apps/mobile/native/android/app/src/main/res/values/colors.xml
+++ b/apps/mobile/native/android/app/src/main/res/values/colors.xml
@@ -5,4 +5,5 @@
<color name="light_blue_600">#FF039BE5</color>
<color name="light_blue_900">#FF01579B</color>
<color name="bootsplash_background">#FFFFFF</color>
+ <color name="bootsplash_background_dark">#1f1f1f</color>
</resources>
\ No newline at end of file
diff --git a/apps/mobile/native/android/app/src/main/res/values/logo_dark_background.xml b/apps/mobile/native/android/app/src/main/res/values/logo_dark_background.xml
new file mode 100644
index 000000000..11caa3f4e
--- /dev/null
+++ b/apps/mobile/native/android/app/src/main/res/values/logo_dark_background.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="logo_dark_background">#1F1F1F</color>
+</resources>
\ No newline at end of file
diff --git a/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj b/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj
index 997d24226..6aa1f0205 100644
--- a/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj
+++ b/apps/mobile/native/ios/Notesnook.xcodeproj/project.pbxproj
@@ -1076,6 +1076,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APPLICATION_EXTENSION_API_ONLY = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Notesnook/NotesnookDebug.entitlements;
@@ -1180,6 +1181,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
APPLICATION_EXTENSION_API_ONLY = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Notesnook/Notesnook.entitlements;
diff --git a/apps/mobile/native/ios/Notesnook/BootSplash.storyboard b/apps/mobile/native/ios/Notesnook/BootSplash.storyboard
index 78f171827..66057f051 100644
--- a/apps/mobile/native/ios/Notesnook/BootSplash.storyboard
+++ b/apps/mobile/native/ios/Notesnook/BootSplash.storyboard
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17147" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
- <device id="retina4_7" orientation="portrait" appearance="light"/>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17120"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
+ <capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -24,7 +25,7 @@
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
- <color key="backgroundColor" red="1.00000000000000" green="1.00000000000000" blue="1.00000000000000" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" notEnabled="YES"/>
</accessibility>
@@ -41,5 +42,8 @@
</scenes>
<resources>
<image name="BootSplashLogo" width="200" height="200"/>
+ <systemColor name="secondarySystemBackgroundColor">
+ <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ </systemColor>
</resources>
</document>
diff --git a/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/Contents.json b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/Contents.json
index 570652dfd..c7e3abd00 100644
--- a/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/Contents.json
+++ b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/Contents.json
@@ -1,23 +1,86 @@
{
- "images": [
+ "images" : [
{
- "idiom": "universal",
- "filename": "bootsplash_logo.png",
- "scale": "1x"
+ "idiom" : "universal",
+ "scale" : "1x"
},
{
- "idiom": "universal",
- "filename": "[email protected]",
- "scale": "2x"
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "light"
+ }
+ ],
+ "filename" : "bootsplash_logo.png",
+ "idiom" : "universal",
+ "scale" : "1x"
},
{
- "idiom": "universal",
- "filename": "[email protected]",
- "scale": "3x"
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "bootsplash_logo-1.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "light"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "light"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
+ },
+ {
+ "appearances" : [
+ {
+ "appearance" : "luminosity",
+ "value" : "dark"
+ }
+ ],
+ "filename" : "[email protected]",
+ "idiom" : "universal",
+ "scale" : "3x"
}
],
- "info": {
- "version": 1,
- "author": "xcode"
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
}
}
diff --git a/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo-1.png b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo-1.png
new file mode 100644
index 000000000..b1c4f454a
Binary files /dev/null and b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo-1.png differ
diff --git a/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected] b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected]
new file mode 100644
index 000000000..007b2db97
Binary files /dev/null and b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected] differ
diff --git a/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected] b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected]
new file mode 100644
index 000000000..b26cae874
Binary files /dev/null and b/apps/mobile/native/ios/Notesnook/Images.xcassets/BootSplashLogo.imageset/[email protected] differ