android-statusbar

Change status bar color with react-navigation

余生颓废 提交于 2021-02-17 19:33:10
问题 I use a DrawerNavigator from react-navigation in my app. Without any customization, the Android status bar is blue, and not black. I tried to do StatusBar.setBackgroundColor('#000000'); but it only works for a few seconds, and then it goes back to blue. It seems that something I am using set the status bar color to blue. However, I tried to remove all dependencies and only keep react-navigation, and it still happens and the docs of react-navigation do not say anything about that. How can I

How to find dimensions for status bar, navigation bar and screen in Android AccessibilityService

早过忘川 提交于 2021-01-29 09:02:07
问题 I have a Java app (API 23). In it I have a MainActivity and an AccessibilityService . In the AccessibilityService: @Override public void onServiceConnected() { oView = new LinearLayout(this); oView.setBackgroundColor(0x88ff0000); // The translucent red color WindowManager.LayoutParams params = new WindowManager.LayoutParams( width, height, xPos, yPos, WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT

Android: hide the statusbar in Chrome Custom Tabs

╄→гoц情女王★ 提交于 2021-01-28 22:37:25
问题 I launch some url with Chrome Custom Tabs in my app and I want to hide the statusbar from the opened window. Is it possible? 回答1: Currently, it's not possible to open a Custom Tab in Chrome with the status bar hidden. It is possible to enable the bar to hide once the user scrolls down the content by calling CustomTabsIntent.enableUrlHiding() 来源: https://stackoverflow.com/questions/38491936/android-hide-the-statusbar-in-chrome-custom-tabs

displaying my toolbar image as background to status bar effecting navigation bar in android

你说的曾经没有我的故事 提交于 2020-08-08 05:37:21
问题 I want my toolbar to take the space of status bar and the image used for it be the background of the status bar and I successfully do that with this code inside my activity // for using status bar space if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } the problem is this code make my activity layout take the full screen even the space with navigation bar so how

displaying my toolbar image as background to status bar effecting navigation bar in android

為{幸葍}努か 提交于 2020-08-08 05:37:07
问题 I want my toolbar to take the space of status bar and the image used for it be the background of the status bar and I successfully do that with this code inside my activity // for using status bar space if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } the problem is this code make my activity layout take the full screen even the space with navigation bar so how

Change status bar text color when primaryDark is white

余生颓废 提交于 2020-05-09 18:16:10
问题 I am trying to reproduce the behaviour of Google Calendar application: but I have not found a way to change the status text color. If i set the colorPrimaryDark as white I cannot see the icons neither text of status bar due their color is white as well. Is there any way to change the status bar text color? Thanks in advance 回答1: I'm not sure what API level your trying to target, but if you can use API 23 specific stuff, you can add the following to your AppTheme styles.xml: <item name=

set windowlightstatusbar property programmatically

北城余情 提交于 2020-04-09 18:00:00
问题 As you know we can set the windowLightStatusBar from xml by following codes. <item name="android:windowLightStatusBar">true</item> i need to change this attribute true to false or false to true by programmatically. Is there a way to achive it? 回答1: set this if you want to change icons colors .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_‌​BAR); and to reset to default set this .setSystemUiVisibility(0); but if you want to change background color of statusBar use this getWindow

set windowlightstatusbar property programmatically

纵然是瞬间 提交于 2020-04-09 17:59:12
问题 As you know we can set the windowLightStatusBar from xml by following codes. <item name="android:windowLightStatusBar">true</item> i need to change this attribute true to false or false to true by programmatically. Is there a way to achive it? 回答1: set this if you want to change icons colors .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_‌​BAR); and to reset to default set this .setSystemUiVisibility(0); but if you want to change background color of statusBar use this getWindow

How do I set my status bar transparent but keep by navigation bar black?

老子叫甜甜 提交于 2020-01-25 01:02:24
问题 As my question suggests, I am trying to figure out how to set my status bar color transparent while keeping my navigation bar black/natural color (without affecting the screen height) I referred to this site : Android Completely transparent Status Bar? one of the solutions that partially worked was : getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); but that pushes my screen content below navigation bar making it

How do I set my status bar transparent but keep by navigation bar black?

蓝咒 提交于 2020-01-25 01:02:07
问题 As my question suggests, I am trying to figure out how to set my status bar color transparent while keeping my navigation bar black/natural color (without affecting the screen height) I referred to this site : Android Completely transparent Status Bar? one of the solutions that partially worked was : getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); but that pushes my screen content below navigation bar making it