Can I change the icons color by config.xml with Ionic?
Like this: Android statusbar icons color but using ionic 4.
I'm using it to change the background color, but I don't know if it's possible to change the icons color by the config as well.
<preference name="StatusBarBackgroundColor" value="#0c6263" />
<preference name="StatusBarOverlaysWebView" value="true" />
Try to use this I think this will be the answer
Related
I already used
cordova-plugin-splashscreen
and in config.xml
<preference name="SplashStatusBarBackgroundColor" value="#b83500" />
<preference name="SplashNavigationBarBackgroundColor" value="#b83500" />
<platform name="android">
...
</platform>
it is not work
and in component.ts
this.statusBar.backgroundColorByHexString('#b83500');
but it change after splash screen.
so, how can i change status bar color during splash screen.
Remove the splash screen plugin and install this version of the plugin from
ionic cordova plugin rm cordova-plugin-splashscreen
ionic cordova plugin add https://github.com/goinnn/cordova-plugin-splashscreen.git#4.0.0#colors
Following this you can then add the preferences in you configx.xml file as you have already mentioned. However, do place them in the android section
<platform name="android">
<preference name="SplashStatusBarBackgroundColor" value="#b83500" />
<preference name="SplashNavigationBarBackgroundColor" value="#b83500" />
...
</platform>
This will solve you issue.
Do keep in mind this will cause issues with the ios version as this is an older version of the plugin itself. It however works perfectly on android.
This will only change color of status bar on splash screen. To keep the color changed you need to keep the following code in your app.component.ts file.
this.statusBar.backgroundColorByHexString('#b83500');
For Android, add following in styles.xml (I'm showing status bar with white background)
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="android:statusBarColor">#android:color/white</item>
</style>
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:statusBarColor">#android:color/white</item>
</style>
Hello I'm building an app with Ionic, and I want to remove the loading spinner on splash screen when the app starts, any solution for this?
Add this to your config.xml-file:
<preference name="ShowSplashScreenSpinner" value="false" />
Here are som more preferences you can make use of.
I would like to know how to remove the status bar under ios please.
On android I do not have this problem, but on iOS the status bar is still visible.
Thank you in advance for your answers
ionic.Platform.fullScreen();
Or
//add the following code in config.xml file
<platform name="android">
<preference name="Fullscreen" value="true" />
</platform>
I built an app with Ionic 2 for Android.
I would like to know if it is possible with Ionic 2 to change the color that is at the top of the smartphone screen.
For example, in the Whatsapp image the top of the screen is green, and in my app it is black. I would like to switch to a lighter red, is this possible?
In your config.xml which is present in root of your project change these lines or add if not there.
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="your color" />
You can achieve this by setting the color of the statusbar.
Put this into your platform.ready block:
platform.ready().then(() => {
StatusBar.backgroundColorByHexString("#34af23"); //change this to your color
}
Probably you also need to import StatusBar from ionic-native:
import { StatusBar } from 'ionic-native';
I have an Apache Cordova project using VS2015 and am using the Ionic framework.
My config.xml includes the following:
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
However I only see the splash screen for a very brief duration (maybe 1/2 a second) when deploying to an iOS device.
Is there some other implementation that is required for splash screens to appear for the time specified by 'SplashScreenDelay'?
Have u tried in in an emulator it might me a one off issue with the device.I would recoment using the GennyMotion emulator.
If you are setting up the splash screen using the cli i would recommend this tutorial and video here
http://pointdeveloper.com/how-to-add-splash-screen-for-ionic-framework-apps/