statusbar
IOS 4.3 hide status bar permanently
Try this: [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade]; From Apple Class Reference: setStatusBarHidden:withAnimation: Hides or shows the status bar, optionally animating the transition. – (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation Parameters hidden YES to hide the status bar, NO to show the status bar. animation A constant that indicates whether there should be an animation and, if one is requested, whether … Read more
Xamarin.Forms – Change StatusBar Color
I believe you would be better off writing a little bit of platform-specific code: For Android: On your MainActivity.cs on the Droid project, right after LoadApplication(new App()); of the overriden OnCreate method, add: Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0)); Like so: protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new … Read more
Using windowTranslucentStatus with CollapsingToolbarLayout
There has now been an update to the design library. I’m guessing that the issue posted above was a bug. If you update the design library to the latest version this issue no longer occurs. I have now removed all fitsSystemWindows=”true” except for the ImageView (as that needs to display under the status bar). I … Read more
Moving status bar in iOS 7
The gist of it is to use this method introduced in iOS 7: https://developer.apple.com/documentation/uikit/uiscreen/1617814-snapshotview: With that you get a UIView containing a screenshot that includes the status bar. Once you have that, it’s just a matter of hiding your current view then pushing the screenshot view around. I posted a proof of concept here: https://github.com/simonholroyd/StatusBarTest … Read more
Android 4.4 translucent Status and Navigation bars style on Android 5.0
Set android:windowTranslucentStatus to false and set android:statusBarColor to @android:color/transparent. Then add code below: getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); If you also want the navigation bar to be translucent, set android:navigationBarColor to @android:color/transparent and combine the flag View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION as well. I didn’t experiment on the navigation bar but it will work.
Check whether status bar is hidden or visible
Check if status bar is hidden: Objective C: if ([UIApplication sharedApplication].isStatusBarHidden) { // do stuff here… } Swift: if UIApplication.shared.isStatusBarHidden { // do stuff here… } Hide status bar: override var prefersStatusBarHidden: Bool { return true }
How to close the status bar/notification panel after notification button click
Use the following two code line to collapse the notification bar. Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); context.sendBroadcast(it);