Skip to content

Commit

Permalink
Fix android splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
yerzhant committed Jan 2, 2024
1 parent f18f699 commit 4aca4da
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
defaultConfig {
multiDexEnabled true
applicationId "ru.azan.tafsir"
minSdkVersion flutter.minSdkVersion
minSdkVersion 21 // flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand All @@ -76,5 +76,6 @@ flutter {
}

dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.core:core-splashscreen:1.0.1"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<item android:drawable="@color/launchBackGround" />

<item>
<bitmap
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item android:drawable="@color/launchBackGround" />

<item>
<bitmap
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-v31/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launchBackGround">#066EB2</color>
</resources>
6 changes: 6 additions & 0 deletions android/app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="Theme.SplashScreen">
<item name="android:windowSplashScreenBackground">@color/launchBackGround</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launchBackGround">#0F6BC4</color>
</resources>

0 comments on commit 4aca4da

Please sign in to comment.