I want to check condition for statusbar. How can i check condition if status bar is visible or not .
please anyone guide me to do this..
Thank you all
Hide the Status Bar on Android 4. View decorView = getWindow(). getDecorView(); // Hide the status bar. // status bar is hidden, so hide that too if necessary.
If you are going to hide status bar at runtime you can add getWindow(). addFlags(WindowManager. LayoutParams. FLAG_FULLSCREEN); before setContentView of onCreate method.
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 }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With