Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Status bar color on splashscreen

$
0
0

Hi,

I'm currently having a little trouble with my app.
When my app is launched i have a splash screen and the android status bar is black, after some seconds she turns blue and load MainActivity.

I have find some interesting information on stackoverflow to force the color but without success.

In the SplashScreenActivity.cs i have this code :

[Activity(Label = "StatusBar.Android", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, Theme = "@style/SplashScreen")]
    public class SplashActivity : Activity
    {
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            StartActivity(typeof(MainActivity));
        }
    }

I also have a styles.xml in my values-v21 forldes with those elements

    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

This refer my color.xml file (in the same folders) containing this :

<resources>
 <color name="colorPrimary">#0d4680</color>
 <color name="colorPrimaryDark">#0d4680</color>
 <color name="colorAccent">#0d4680</color>
</resources>

Can i do something to have my color set on the start of the splashscreen when i click on my app icon and not after his loading ?
The third image is the first screen of linkedIn app, i don't know if she is native or not but it seem to be possible.

Thank for your help.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>