Questions tagged [android-statusbar]

The status bar located on the top of the Android device screen. It displays system status icons and notification icons.

The status bar is the Android device screen area dedicated to the display of notifications, communication of device status. It displays pending notifications on the left and status, such as time, battery level, or signal strength, on the right. Swiping down from the status bar shows notification details.

This tag is to be used with tag.

392 questions
5
votes
1 answer

How do I undo changes to window decor view?

I have two fragments in my activity, fA and fB. When I click a button in fA, fB replaces fA. fB is just like the google play store view, when you open to view some app. The image is under a transparent status bar. I did this by adding this code to…
5
votes
2 answers

EditText shows the status bar, or causes content above to move instead of resize

Background I have a login Activity , which has a layout as such (vertically, from top to bottom) : title (logo ImageView and TextView) image&viewPager that takes the rest of the screen EditTexts&login button, appear on top of #2 (covering a part of…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
5
votes
2 answers

Android how to hide NotificationCompat.Builder notification`s icon on status bar?

My question is quite simple, but I couldn't get around it for a long time so I'm asking here. How to hide the ongoing notification's icon, that is displayed in the status bar? I am creating the notification with NotificationCompat.Builder object. I…
aphelion
  • 561
  • 1
  • 5
  • 12
4
votes
1 answer

ViewCompat.setOnApplyWindowInsetsListener makes Status Bar color disappear

This is the code I use to detect when the Keyboard Height changes. Only the problem is that the Statur Bar color disappears and turns white when this code runs. ViewCompat.setOnApplyWindowInsetsListener(this.getWindow().getDecorView(), (v, insets)…
Peter
  • 1,848
  • 4
  • 26
  • 44
4
votes
2 answers

How to implement transparent status bar in Jetpack Compose Android

I want to implement transparent status bar in jetpack compose. I have integrated the Accompanist library for this but it has no transparent effect on status bar. implementation "com.google.accompanist:accompanist-systemuicontroller:0.18.0" //…
4
votes
4 answers

How to change status Bar Color in Jetpack Compose + Material 3

I'm following the theming tutorial from developer.google. I'm trying to migrate the app to Mat. 3 and modify the status bar's color to match with the background color. After adding android:statusBarColor and android:windowLightStatusBar, nothing…
4
votes
1 answer

How to achieve a transparent statusbar after migrating to Material Design themes?

I am in the process of migrating my app theme to a Material Design theme and I am having problems with certain situations where I need a transparent status bar (for example when using a CollapsingToolbarLayout, when expanded the toolbar should be…
4
votes
3 answers

Android Window flag FLAG_TRANSLUCENT_STATUS is deprecated now, How to fix this?

I an trying to update status bar dynamically as below but getting warning that flag FLAG_TRANSLUCENT_STATUS is depricated now, how i can fix this? if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // clear FLAG_TRANSLUCENT_STATUS…
sweet_vish
  • 141
  • 1
  • 8
4
votes
1 answer

Change the Statusbar text color to black when the Statusbar background is white

I have tried tried a few solutions given here but none seems to work for me. This is what I have in my colors.xml #fcfdfb
dspblack
  • 65
  • 1
  • 4
4
votes
1 answer

Android - Full Screen without moving the content

I am developing a reading app from where users can read multiple types of documents. This app also has a feature to enable full screen by touching any part of the screen. I am able to enable/disable full screen by hiding the status bar and the tool…
4
votes
2 answers

How to change the status bar icon while service is running

I want to change the notification smallIcon in the status bar while a foreground service is running, depending on the status the service gathers, namely "mute" or "unmute". What is needed to display alternate smallIcons from the res.drawable…
monok
  • 494
  • 5
  • 16
4
votes
1 answer

setting SYSTEM_UI_FLAG_LIGHT_STATUS_BAR makes next fragment blank and collapsing toolbar unstable on api <= 27

I use NavHostFragment with BottomNavigationView with 5 tabs and fitsSystemWindows="true". Description: App has different app bar design for each fragment. For example, in 1st fragment app bar contains CollapsingToolbarLayout with background image…
4
votes
2 answers

Does getSize() in Android include the height of the status bar?

Is there a way to tell if getSize() includes the height of the status bar? From testing on a few different phones it seems it does on some but not on others and it is frustrating when trying to make everything in the layout line up properly. After…
Tom3652
  • 2,540
  • 3
  • 19
  • 45
4
votes
2 answers

Cordova: StatusBar plugin works on emulator but not on device

I have a cordova project and I installed the StatusBar plugin to color the status bar of the device in the Android platform. The plugin displays the correct status bar color if I run the project on an AVD (pic1), but when I run it on the device it…
Brian
  • 287
  • 4
  • 16
4
votes
4 answers

Status Bar Color Always Grey In Activities After Setting SDK to 27

Anyone else experiencing issues with the status bar always being grey since using sdk 26 or 27? I recently updated Android Studio and using 27 as my target sdk and now every Activity that is launched has a grey status bar. I have not changed the…
JPM
  • 1,482
  • 5
  • 18
  • 25