statusbar

set custom color of status bar in swift?

夙愿已清 提交于 2019-12-12 16:03:09
问题 On a view controller, i want to set the color of status bar black but I am not able to change it. I am using below code for this purpose. func setUpUI() { self.navigationController?.setNavigationBarHidden(true, animated: false) UIApplication.shared.statusBarStyle = UIStatusBarStyle.default } I have also added the value in info.plist 回答1: You just override the return value of the status bar, like this: override var preferredStatusBarStyle: UIStatusBarStyle { return .lightContent } 回答2: Use

How can i do a notification in the status bar without the expanded message in the “Notifications” window? (only want the icon)

做~自己de王妃 提交于 2019-12-12 15:39:32
问题 How can i do a notification in the status bar but without the expanded message in the "Notifications" window? i mean, i need just the icon, nothing more there is a way to do that? 回答1: Quoting the documentation: A status bar notification requires all of the following: An icon for the status bar A title and expanded message for the expanded view (unless you define a custom expanded view) A PendingIntent, to be fired when the notification is selected Hence, you will need to have an entry in the

hide status bar in landscape mode leave a blank space when rotating

爷,独闯天下 提交于 2019-12-12 11:10:25
问题 My application support to display some screen in landscape mode, and in landscape mode, I set to hide the status bar to get mode space to display data. The problem is while hiding the status bar and rotate screen, it leave a white pace at status bar position until the screen is rotated completely as below screenshot. I guess that steps of operations when rotating screen are: 1. hide status bar 2. rotate screen 3. resize screen to take place of status bar. So until the screen is rotated

Customizing android status bar

倖福魔咒の 提交于 2019-12-12 10:24:19
问题 I am a newbie to android app development. I want to customize my android status bar. I searched in web for this requirement, I saw a video on youtube, what i understood after watching that video is 1 file named framework-res.apk is responsible for status bar. He is using adb pull command with file name framework-res.apk and doing something. Can anybody explain what is that procedure. Any help will be appreciated. Thanks. 回答1: From what I understand you are trying to customize home screen? If

How to toggle the Statusbar?

余生颓废 提交于 2019-12-12 09:08:47
问题 I'm looking for a way to show and hide the statusbar with an onClickListener , but only showing it works. WindowManager.LayoutParams lp = getWindow().getAttributes(); if (isStatusbarVisible) lp.flags = LayoutParams.FLAG_FULLSCREEN; else lp.flags = LayoutParams.FLAG_FORCE_NOT_FULLSCREEN; getWindow().setAttributes(lp); isStatusbarVisible = !isStatusbarVisible; Hiding the statusbar using FLAG_FULLSCREEN seems to work only if the flag is set before calling setContentView() . Is there another way

ios7 UINavigationBar stops extending under status bar after a while

≡放荡痞女 提交于 2019-12-12 08:26:39
问题 First of all - this is NOT a question about navigation bar overlapping status bar (as many others). UINavigationBar (of my navigation controller) is perfectly aligned as I want. The problem is with my navigation bar custom background. Background image (or navigation bar itself) stops expending under status bar randomly (after few seconds after my application starts or when I present / dismiss modal navigation controllers over it). My custom image has proper dimensions for iOS (640x128px). 1.

Status Bar sensitive information like Telegram X

痴心易碎 提交于 2019-12-12 08:04:24
问题 I`m digging for many days and didn't found the information about this functionality that presents in Telegram X (newest version which the source code isn't opened yet, running on nexus 5x api 27 emulator) When application is in "waiting for network" , this information appears inside your translucid status bar, like this gif. My questions is, how could I achieve this? Sounds like they are using some kind of context to hide content inside status bar (look at notification icons and mobile

Disabling browser status bar text

可紊 提交于 2019-12-12 07:47:42
问题 Background Modern browsers do away with the classic status bar and instead draw a small tooltip at the bottom of their windows that displays the link target on hover/focus. An example of this (undesirable, in my case) behavior is illustrated in the following screenshot: Questions Is there a portable way to disable these tooltips? Am I missing any obvious drawbacks to doing this in my particular situation? Is my attempt (see below) a reasonable way of accomplishing this? Reasoning I am working

Notification restart my activity and pause button on notification

我的梦境 提交于 2019-12-12 04:35:54
问题 My notification get restart when i click on it by Status bar when i start my app it stream audio from server and show a notification until i don't clear it from status bar so my problem is when i click on my app notification it restart the activity and stop the streaming music.. so please suggests me solution for to stop restarting app again from notification and i want to show notification which stick on notification bar upto i exit from app Also I want to Show pause and Play button on

Custom background color for status bar in iOS app created with Xcode and Swift

给你一囗甜甜゛ 提交于 2019-12-12 03:23:53
问题 I already googled a little bit but without success. I want to have a custom background color for the status bar in all my ViewControllers (only in portrait mode). The ViewControllers are managed with a TabBarController. Does anybody know how to do that? Maybe anybody has a code sample? 回答1: I already solved the problem myself by putting a UIView below the Status bar and set the background color. But I had to clear all constraints and add them again to make the UIView hiding in landscape mode.