Change status bar color with AppCompat ActionBarActivity

后端 未结 7 1631
一个人的身影
一个人的身影 2020-11-29 17:04

In one of my Activities, I changed the Toolbar color using Palette. But on 5.0 devices using ActionBarActivity the status bar color i

7条回答
  •  粉色の甜心
    2020-11-29 17:48

    Thanks for above answers, with the help of those, after certain R&D for xamarin.android MVVMCross application, below worked

    Flag specified for activity in method OnCreate

    protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
        }
    

    For each MvxActivity, Theme is mentioned as below

     [Activity(
        LaunchMode = LaunchMode.SingleTop,
        ScreenOrientation = ScreenOrientation.Portrait,
        Theme = "@style/Theme.Splash",
        Name = "MyView"
        )]
    

    My SplashStyle.xml looks like as below

    
     
        
     
    

    And I have V7 appcompact referred.

提交回复
热议问题