change status bar color android

Solutions on MaxInterview for change status bar color android by the best coders in the world

showing results for - "change status bar color android"
Ann
14 May 2019
1// for my fellow react-native developers
2// add this in styles.xml
3<resources>
4    <!-- Base application theme. -->
5    <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
6        <!-- Customize your theme here. -->
7        <item name="android:textColor">#000000</item>
8        <item name="android:windowDisablePreview">true</item>
9        <item name="android:windowBackground">#000000</item>
10        <item name="android:colorBackground">#000000</item>
11        <item name="android:statusBarColor">#000000</item>//<--add_this
12    </style>
13
14</resources>
Meagan
30 Apr 2016
1 public void statuscolor(){
2        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
3            Window window = getWindow();
4            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
5            window.setStatusBarColor(Color.parseColor(getPreferences().getString(Constant.SECONDARY_COLOR, Constant.SECONDARY_COLOR)));
6        }
7    }
Lorenzo
16 Jan 2019
1Window window = activity.getWindow();
2
3// clear FLAG_TRANSLUCENT_STATUS flag:
4window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
5
6// add FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag to the window
7window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
8
9// finally change the color
10window.setStatusBarColor(ContextCompat.getColor(activity,R.color.my_statusbar_color));
Angela
04 Mar 2018
1WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
2Window window = Activity.getWindow();
3View view = window.getDecorView();
4
5// You need androidx.core for this
Manuel
27 Jul 2016
1if (Build.VERSION.SDK_INT >= 21) {
2            Window window = this.getWindow();
3            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
4            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
5            window.setStatusBarColor(this.getResources().getColor(R.color.colorPrimaryDark));
6        }
7
queries leading to this page
show color on status bar androidset status bar color white androidandroid kotlin topbar colorandroid style status bar colorchange status bar color and navigation status bar android kotlinhow to change status bar color and heading color in android studiochange status bar icon color android programmaticallyandroid studio status bar color themeedditing the status bar color in android studiohow to override android statusbar colorchange color of status bar text androidhow to make status bar color white in androidstatus bar colordifferent status bar color androidandroid statusbarcolorhow to change the color of status bar programatically in android studiohow to change status bar color of android xmlchange statusbar color androidset status bar text color android studiokotlin make statusbarhwhat is the best way to set status bar color in android 01change color of status bar androidandroid 3a change status bar text color with white 2fblackandroid revert status bar color programmaticallyhow to change bottom status bar color in androidchange status bar and menu bar color androidandroid status bar color kotlononly change in statusbar color kotlinhow to status bar color change i an activityhow to set dark status bar in androidandroid status bar colorhow to merge the status bar color in androidandroid change status bar color xmlhow to manually change the color of the status barhow to change status bar color in android programmatically when hidehow to change color in status bar androidandroid status bar color transparenthow to change status bar text color in androidstatus bar color kotlinhow to change color of text of status bar in androidstatus bar text color androidhow to change status bar color androidandroid status bar color changestatus bar style androidsetting notification bar color in android stylesandroid studio change color of top barhow change status bar text colorandroid status bar color is whitechange color status bar activity androidandroid set statusbar colorandroid change color of status bar programmaticallychange color of android status barset color for status bar androidchange color status bar androidstatus bar color programmatically androidhow to change status bar color in androidandroid studio change battery network bar colorcolor of content on status barandroid studio status bar colorstyle status bar androidandroid topbar colorchange status bar in androidandroid statusbar colorhow to change status bar color programmatically in androidhow to change progress bar color in android programmaticallychange status bar color android stusioset status bar text colorset status bar color android javachange status bar background color androidhow to change color of status barchange status bar color androidstandard status bar color androidset status bar color android xmlwebsite change status bar colorhow to change status bar clor in androidchange status bar text color to black androidsetting status bar color android on a pagehow to change top status bar color in androidwhy action bar color doesn 27t change in mobile device but works in emulatorandroid custom status bar colorhow to change the color of status bar android studioandroid status bar color programmaticallyhow to change the text color of the statusbar android studiochange color of notification bar androidandroid mvm set window statusbarcolorset status bar background color androidcusotm satus bar color androidhow to manually change the color of the status bar in kotlinstatus bar color android studioandroid status tool bar colorchange status bar color android kotlinandroid statusbar whitechange status bar color android activityandroid studio change status bar colorandroid application default status bar color set in android studioapp bar doesn color status bar android studiomake status bar text color dark androidwhite status bar android kotlinhow to style status bar in android studiochange statusbar color in android studiohow to change status bar color to white in android programmaticallyandroid status bar color textactivity window statusbarcolorstatus bar color change android studioset status bar text color androidhow to set the color on items on the windows status bar android kotlinset status bar tint color androidandroid status bar text colorandroid status bar change text colorhow to change status bar automatically android programmaticallychange status bar colorhow to change color of status bar in androidchange statusbar text color androidandroid text color of status barhow to change status bar text to dark androidandroid change status bar background colorchange status bar text color android studiochange status bar color android on dilogactivity custom status bar color programmically androidandroid status bar text color to darkandroid top status bar color changeset status bar color android styleandroid developer status bar colorchange color of status barset status bar color androidchange the status bar text color android studihow to set status bar whitechange status bar icon color android p programmaticallystyles status bar colorchange status bar color android studio stylehow to change status bar color of android t 3dxmlwhite status bar androidhow to change color of status bar in android studioset time bar androidstatus bar color changerstatus bar text color android cssandroid studio change color of status barstatus bar text color androidset status bar color in androidandoid change color of status barstatus bar text color change androidandroid xml status bar color change status bar color android xmlandroid status bar colorchangestatus bar 2 colors androidhow to change the color of the status bar androidchange status bar color android programmaticallystatus bar custom color androidstatus bar color change automaticallyandroid status bar colorhow to change android studio status bar text color into blackstatus bar color not changing androidchaneg the color of status bar i androidgive status bar color androidhow to change the status bar color in androidchange the status bar color android for api 16changing status bar color androidandroid change status bar color and icon colorhow to change the color of the notification bar on android studiostatus bar tex color androidhow to make status bar black in androidhow to change the status bar color to white in androidandroid set window status color from viewmodelchange status bar color material androidandroid studio change top bar colorandroid studio how to change color of status barshow status bar content in black androidchange status bar androidhow to change status bar color androi dapphow to change status bar automatically androidhow to change status bar color android javastatus bar color in androidandroid status bar white style android change colour of status barandroid status bar white backgroundset status bar color programmatically androidhow to chenge statusbar text and background colour programaticly android studioumatch color of status bar with activity color android studiohow to remove status bar color in androidandroid recolor status barhow to set status bar colour system defualt in android programmaticallyset status bar color to default androidhow to change color of status bar topkotlin change status bar colorwhy use status bar color androidhow to change status bar color of android thow to change status bar color progrmatically in androidswiftui 5c status bar colorandroid status bar multiple colors how to change status bar color in android studiohow to change toolbar color and status bar androidhow to change color of status bar text in androidmake status bar white androidchange statusbar text kotlin androidhow to set status bar text colour system defult android studiouchange color value statusbarcolor android ioschange color programmatically androidandroid set status bar colorandroid set status bar color programmaticallychange status bar color for different activity in androidstatus bar based on theme xmlandroid studio change color of status bar in an activitystatus bar clor change in androidset top indicator android colorhow to change the color of status bar in androidhow to set color of status bar in androidstatus bar color change androidstatus bar change color androidandroid change status bar programmaticallyandroid change system status bar colorapp background on status bar androidset default statusbar color android programmaticallystatus bar color androidstatus bar color text androidhow to make status bar color blackin androidsame status bar color as per the layout androidchange status bar color in fragment androidchange status bar color auto place activity in androidchange color of notification bar android studiochange status bar icon color androidhow to change the color of notification bar in android studiochange status bar icons color android programmaticallyset status bar color to white androidhow to set text color of status bar in androidstatus bar background color androidhow to change status bar color in andoid studioandroid change top bar coloredit status bar color android when app is in backgroundchange status bar text color androidhow to style status bar in android studio javaandroid status bar color whiteset status bar color transparent androidandroid studio change color notification barkotlin status bar colorchange status bar color for each activity androidhow to change status bar color in kotlinandroid status bar color themegreen status bar androidhow to status bar color change in an activitychange color of status bar android programmaticallyhow to change color of status bar and text in android programmaticallystatusbar color android kotlinchange the color of status bar in android kotlinstatus bar dual colors androidchange status bar color android themeandroid change status bar text colorandroid bar color changehow to set notification bar color in androidactivity status bar colorchange status bar color kotlinstatus bar color not changed in androidkotlin set color of status barandroid studio set status bar colorchange status bar color android javaandroid status bar colomake status bar color white in whole application in androidandroid status bar content colorandroid change topbar color in appchange status bar icon color change android programmaticallystatus bar action mode color androidstatus bar change colorstatusbar color android studiphow to set status bar color in android xmlandroid application default status bar colorchande ststus barcolor androidchnage statusbar color android show to change the top bar color on androidchange the status bar color android developerandroid change system status bar color programmaticallyandroid change status bar color programmaticallychange top bar color androidhow to change status bar colorandroid dev edit status barandroid black status barbest status bar color androidsignal status bar color rgb ui designchange status bar color with activity background color androidchange background color of status bar kotlinchange status bar android studiochange status bar color android studiostatus bar android change colorhow to change status bar color in for activity androidandroid change color of status barchang status bar colorstatus bar color android programmaticallyset the color of text in status bar and navigation bar androidhow to chenge statusbar text and background colour programaticly android studiohow to change the color of the status bar in kotlinhow to make the status bar color white in androidstatusbar white androidandroid change status bar themehow to change status bar color text color in android programmaticallystatus bar color transparent androidchange status bar color android full screenchang status bar color kotlinhow to change notification bar color in androidhow to change status bar style in android studiohow to set status bar color in androidstatus bar white color black android from styleandroid studio java change status bar color programmaticallyhow to change the status bar color from activity in androidandroid kotlin change status bar colorstatus bar color android kotlinhwhat is the best way to set status bar color in androidcustom status bar color androidstatus bar multiple colors androidhow to change status bar color in android programmaticallyandroid change status bar colorchange status bar text color android programmaticallyandiord status bar colorhow to change android studio status bar color into blackchange status bar color htmlandroid status bar text color changechange background color of status bar in androidhow to make status bar white on androidhow to change status bar color in andoirdhow to change statusbar color in androidhow to change the color od status bat in androidchange status bar color android studio activitychange status bar color programmatically androidandroid status bar no colorchange android status bar colorchange the status bar color androidhow to change the color of the status bar in kotlin of specific activitychange status bar color android