Skip to content

Commit

Permalink
feat: implement new splash screen static version
Browse files Browse the repository at this point in the history
  • Loading branch information
briansztamfater committed Feb 23, 2023
1 parent e830f63 commit 28e0199
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 44 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "androidx.core:core-splashscreen:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:allowBackup="false"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:theme="@style/Theme.AppSplash"
android:name=".MainApplication"
android:largeHeap="true"
android:usesCleartextTraffic="true">
Expand All @@ -38,6 +38,7 @@
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AppSplash"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import com.facebook.react.ReactFragmentActivity;
import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.modules.core.PermissionListener;
import org.devio.rn.splashscreen.SplashScreen;
import androidx.core.splashscreen.SplashScreen;

import java.util.Properties;
import im.status.ethereum.module.StatusThreadPoolExecutor;
Expand Down Expand Up @@ -121,21 +121,18 @@ public void onNewIntent(final Intent intent) {

@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen splashScreen = SplashScreen.installSplashScreen(this);

switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
case Configuration.UI_MODE_NIGHT_YES:
setTheme(R.style.DarkTheme);
SplashScreen.show(this, R.style.DarkTheme, R.id.lottie);
break;
case Configuration.UI_MODE_NIGHT_NO:
setTheme(R.style.LightTheme);
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
break;
default:
setTheme(R.style.LightTheme);
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
}
SplashScreen.setAnimationFinished(true);
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this);

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<resources>
<color name="alert_background">#ffffff</color>
<color name="alert_text">#000000</color>
<color name="splash_background">#09101C</color>
<color name="splash_status_bar_color">#ffffff</color>
</resources>
13 changes: 13 additions & 0 deletions android/app/src/main/res/values/splash_theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.AppSplash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_logo</item>
<item name="windowSplashScreenAnimationDuration">1000</item>

<!-- Status bar and Nav bar configs -->
<item name="android:statusBarColor" tools:targetApi="l">@color/splash_status_bar_color</item>
<item name="android:windowLightStatusBar">false</item>

<item name="postSplashScreenTheme">@style/DarkTheme</item>
</style>
</resources>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions ios/StatusIm/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
2 changes: 2 additions & 0 deletions ios/StatusImPR/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
<string>armv7</string>
<string>gamekit</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
8 changes: 4 additions & 4 deletions ios/launch-image-universal.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<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"/>
Expand All @@ -20,7 +20,7 @@
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" red="0.035294117647058823" green="0.062745098039215685" blue="0.10980392156862745" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="2aN-f8-qiu"/>
Expand All @@ -33,7 +33,7 @@
</scene>
</scenes>
<resources>
<image name="launch_image" width="90" height="101"/>
<image name="launch_image" width="84" height="88"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
Expand Down
106 changes: 79 additions & 27 deletions nix/deps/gradle/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,20 @@
}
},

{
"path": "androidx/core/core-splashscreen/1.0.0/core-splashscreen-1.0.0",
"host": "https://dl.google.com/dl/android/maven2",
"type": "aar",
"pom": {
"sha1": "763acf4fa60a08a3c059a4c50d3d54ac34a0cfa2",
"sha256": "0arxyx9zlzwlr0h88xmgzlgbjfp3s79pd7mbk3ipfqwkfgbzzmq3"
},
"jar": {
"sha1": "6b1eccca966811faafb13f6c2f88351504dc9eae",
"sha256": "0wiarwyh5rk7ca54b0i47rs7ix49r2krrvhiqamw8gyaq4yv51iy"
}
},

{
"path": "androidx/core/core/1.0.0/core-1.0.0",
"host": "https://dl.google.com/dl/android/maven2",
Expand Down Expand Up @@ -6930,12 +6944,12 @@
},

{
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.1/jaxb-bom-ext-4.0.1",
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.2/jaxb-bom-ext-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "6916f1573d78b0d41b629257277da86215ea7a6f",
"sha256": "069gm0wclljzdjn5j29hizhc4rakszk8kgzmsx66h5fkvlcvgd5b"
"sha1": "600924984be6a63e1c38d5f6ef0637a070002937",
"sha256": "1jsdpynkd7d7bqp81ajcy7fa2riz9wnl8rb81icd8shv7awnkbfx"
}
},

Expand All @@ -6950,12 +6964,12 @@
},

{
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.1/jaxb-parent-4.0.1",
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.2/jaxb-parent-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "315ec09b889041008f815ddd41cca9633ee50cc4",
"sha256": "1bpqac2a25qq81h99zvj20n9ac2hd8iry7mnwisvd4f8avpm272i"
"sha1": "160938bb66dc61a4839edaad77a5b7b7f9f5171d",
"sha256": "184avj0jpjz1rsxrrw88yn31yxkvw1l3blyq6fs4sbmgac12dvqc"
}
},

Expand All @@ -6980,12 +6994,12 @@
},

{
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.1/jaxb-txw-parent-4.0.1",
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.2/jaxb-txw-parent-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "0f5e6242fe24ccd5e4c663dc66f7b935b4cffb55",
"sha256": "1niyxycc1k9qb0hpkb30zcccai28pq4yhy9a8p45d24zgrvdgs1a"
"sha1": "c9c99b4e33782535b5988616bc3b452543cb48e5",
"sha256": "0xxyqayffjwdmagqa6jqca8ykl3iz2vhw59l6478nv8ir268x2rn"
}
},

Expand Down Expand Up @@ -8540,16 +8554,16 @@
},

{
"path": "org/checkerframework/checker-qual/3.29.0/checker-qual-3.29.0",
"path": "org/checkerframework/checker-qual/3.30.0/checker-qual-3.30.0",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "76bd5ffeef4d9b039e6445e2674264dbc5bfb94c",
"sha256": "0azs4ndih02r5a3fvn08sndwc58ymzma2krqclfz6pivmfrxcyp2"
"sha1": "5539717d695d7acb0d86aa5a5785578d113e8c73",
"sha256": "03bbalk2lfzdi4dym7zvmh23hcmgpbpr38ya25gpl6alrxscyz71"
},
"jar": {
"sha1": "a805a761b7a734d69f9c1766ead1ff78698a1497",
"sha256": "1hb8ajlszzvh3cimvzkwgkx2689rh131jh7259a7s94cvzjq1p77"
"sha1": "8ccaf082954046504ec266c76c7776ffff2a08d4",
"sha256": "0zxasxgnf8amxa8h72iwi1ysyv17wl3xna6d95rblm3yh7z42yg4"
}
},

Expand Down Expand Up @@ -8775,6 +8789,16 @@
}
},

{
"path": "org/eclipse/ee4j/project/1.0.8/project-1.0.8",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "41a621037931f9f4aa8768694be9f5cb59df83df",
"sha256": "0jv7vwx72mx30ydlhk5ql3q8zb67m2qpw43f4inaypm3aip7n30d"
}
},

{
"path": "org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2",
"host": "https://repo.maven.apache.org/maven2",
Expand Down Expand Up @@ -8828,12 +8852,12 @@
},

{
"path": "org/glassfish/jaxb/jaxb-bom/4.0.1/jaxb-bom-4.0.1",
"path": "org/glassfish/jaxb/jaxb-bom/4.0.2/jaxb-bom-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "99d85661aef6ac9f6bfb6af0f0ea507d054b91e1",
"sha256": "151zbrywjzbnmwqg246iyz0bqnx2hh730hxmig62vh67s2nbw8lm"
"sha1": "12668536ac24e77398bd675a1e458c1824d156c7",
"sha256": "08bgmpyhps9h25z6950g7751zg6g5vkvn02v1znamarlaw2niyl6"
}
},

Expand All @@ -8852,16 +8876,16 @@
},

{
"path": "org/glassfish/jaxb/jaxb-core/4.0.1/jaxb-core-4.0.1",
"path": "org/glassfish/jaxb/jaxb-core/4.0.2/jaxb-core-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "e366262bbe2037088461f748896f6aa4afcfd3c6",
"sha256": "14d3d3p0c42qd8jq8mxmpymd17x5zxixhyccwfmxkr24ad9pvj46"
"sha1": "9aecfe4442b96fc3f9cabc25e7c6e310972d674e",
"sha256": "00yij4s17cvixysjdjrzc51jd07fpcc11jy4lgg1z8zfvx6zdhma"
},
"jar": {
"sha1": "b4707bb31dfcf54ae424b930741f0cd62d672af9",
"sha256": "19v525w4qb65czx1v31k5lz0yan9vc030h736iqgz59l2048hf3l"
"sha1": "08c29249f6c10f4ee08967783831580b0f5c5360",
"sha256": "1k8c8wf420nmqyhyr6p0ns12mx127bzwq71rp6x0nj3qmma2kzyp"
}
},

Expand Down Expand Up @@ -8894,16 +8918,16 @@
},

{
"path": "org/glassfish/jaxb/txw2/4.0.1/txw2-4.0.1",
"path": "org/glassfish/jaxb/txw2/4.0.2/txw2-4.0.2",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "160273691bf3ffa0745bf86453dd56c62ec23ac2",
"sha256": "03zv45jgmppikcqk7gq01pyryzvam3qnllc5q7jjywvnq5mjdvvp"
"sha1": "f8eef3319522b021e51123ea88d6ab4d484d2c59",
"sha256": "1ry99inn7v0fpgfrnhj3h4qnhaccmksn8vsrgfn1ysj6cqrfgc8p"
},
"jar": {
"sha1": "797720dfe2e15504f6014fb82eb873051a653c75",
"sha256": "1aba3rk9jm66k65vx95a92sdapbsvfbsvii26s8y9rach44p9m7l"
"sha1": "24e167be69c29ebb7ee0a3b1f9b546f1dfd111fc",
"sha256": "036gl0lp8y83zxy01pyzvq169i0r03lhm169fw7m6hha9wp92wga"
}
},

Expand Down Expand Up @@ -9819,6 +9843,20 @@
}
},

{
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "747a8ea8a8a4328946cf0252c5ceb2aa0ceb054f",
"sha256": "18kbabqzyiv5rzcvxzn28wsk6cxnh7aliiayian2sg7xfgp5dhav"
},
"jar": {
"sha1": "5e5b55c26dbc80372a920aef60eb774b714559b8",
"sha256": "0qr34h6pkf6bw6vagc06y78ln6gikj3qq3hrgfai8flzrmcyqfqq"
}
},

{
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10",
"host": "https://repo.maven.apache.org/maven2",
Expand Down Expand Up @@ -10239,6 +10277,20 @@
}
},

{
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "f44be76009ce4253eaa59b914f4dccc384442016",
"sha256": "0d0zmvx7znha69ir50z72n7nzgw4yr6rfzb6mb6kdn0vl1dp4hnf"
},
"jar": {
"sha1": "11ef67f1900634fd951bad28c53ec957fabbe5b8",
"sha256": "14m428q4m7y8srb7z5m0qfq8ic3f62layqwgn9rpacxvf9k5573k"
}
},

{
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10",
"host": "https://repo.maven.apache.org/maven2",
Expand Down
3 changes: 3 additions & 0 deletions nix/deps/gradle/deps.list
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ androidx.constraintlayout:constraintlayout:2.0.4
androidx.coordinatorlayout:coordinatorlayout:1.0.0
androidx.coordinatorlayout:coordinatorlayout:1.1.0
androidx.core:core-ktx:1.6.0
androidx.core:core-splashscreen:1.0.0
androidx.core:core:1.0.1
androidx.core:core:1.1.0
androidx.core:core:1.6.0
Expand Down Expand Up @@ -517,6 +518,7 @@ org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.10
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
Expand All @@ -536,6 +538,7 @@ org.jetbrains.kotlin:kotlin-stdlib:1.3.50
org.jetbrains.kotlin:kotlin-stdlib:1.4.31
org.jetbrains.kotlin:kotlin-stdlib:1.5.10
org.jetbrains.kotlin:kotlin-stdlib:1.5.30
org.jetbrains.kotlin:kotlin-stdlib:1.6.21
org.jetbrains.kotlin:kotlin-util-io:1.3.50
org.jetbrains.kotlin:kotlin-util-io:1.4.31
org.jetbrains.kotlin:kotlin-util-klib:1.4.31
Expand Down
Loading

0 comments on commit 28e0199

Please sign in to comment.