'How to remove gray screen before splash screen - Ionic 4
Has someone managed to remove the gray screen when launching an ionic app from an android device? Is there a way to remove this annoying gray screen?
Solution 1:[1]
Add
xmlns:android="http://schemas.android.com/apk/res/android"
and
xmlns:cdv="http://cordova.apache.org/ns/1.0"
( if not present) inside you widget tag in you config.xml present in the root of your project.
Then replace android:theme value of your main activity with
@android:style/Theme.Light.NoTitleBar.Fullscreen
Thats it. You need not add any custom styles (If you don't want).
Solution 2:[2]
for me i added this code in style.xml file: /Users/User/Development/project/platforms/android/app/src/main/res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">false</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
and edited my AndroidManifest.xml File : android:theme="@style/SplashTheme"
added that to the activity
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | mani kandan |
Solution 2 | Nsamba Isaac |