change status bar color android programmatically

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

showing results for - "change status bar color android programmatically"
Mariah
17 Jan 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>
Lukas
16 Jan 2017
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    }
Alberto
28 Nov 2020
1WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
2Window window = Activity.getWindow();
3View view = window.getDecorView();
4
5// You need androidx.core for this
Silvia
14 May 2019
1getSherlockActivity().getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xff00ACED));
2mActionBar.setBackgroundDrawable(new ColorDrawable(0xff00DDED));
3mActionBar.setDisplayShowTitleEnabled(false);
4mActionBar.setDisplayShowTitleEnabled(true);
queries leading to this page
how to change the color of the action bar in android studiochange status bar color for different activity in androidhow to change the color of status bar programatically in android studiochange top bar color androidandroid set status bar color programmaticallybest status bar color androidchange background color of status bar in androidhwhat is the best way to set status bar color in android 01change action bar color android studio apphow to change action bar background color in androidstatus bar color not changing androidhow to change status bar color to white in android programmaticallyactionbar color change androidhow to change status bar color in android programmatically when hidehow to change android studio background colorandroid change text color action barandroid set status bar colorhow to change the color of action bar in android studio in kotlinchange status bar background color androidhow to set action bar color in androidstatus bar custom color androidstatus bar change color androidchange action bar text color android studiohow to change action bar color in android studioandroid get action bar colorchange status bar text color to black androidhow to change status bar color in androidchange status bar color programmatically androidandroid set action bar background colorandroid change colour of status barhow to set toolbar color in android programmaticallychange status bar color android activitychange statusbar text color androidmatch color of status bar with activity color android studiohow to set color white to the action bar in androidhow to change status bar color android javastatus bar color change android studiohow to change color of action bar 27s text in android programmaticallystatus bar color programmatically androidchange status bar icons color android programmaticallyhow to change the action bar color in android studiostatus bar white color black android from styleandroid text color of status barchange color of action bar in android studiochange color status bar androidandroid status bar color how to change action bar title color in androidhow to change the text color of the statusbar android studiochange the status bar text color android studihow to status bar color change in an activitychange color action bar androidchange status bar androidhow to change bottom status bar color in androidhow to change status bar color in andoirdandroid set action bar text color programmaticallyandroid application default status bar colorhow to change status bar text to dark androidandroid change status bar color and icon colorhow to change status bar color in for activity androidchange color of status bar text androidchange status bar color android themehow to change action bar icon color in androidandroid status bar white style status bar color android studiostatus bar color androidhow to set status bar text colour system defult android studiouhow to change the color of the status bar androidandroid change colour of action barhow to change color of action bar in android programmaticallyandroid studio set action bar text colorandroid change color of action bar in themehow to change the color of action bar in android studiohow to change color of action bar and text in android programmaticallymake status bar color white in whole application in androidandroid action bar colorhow to change action bar back button color in androidchange status bar color android stusioset android action bar color android studioandroid set window status color from viewmodelchange status bar icon color change android programmaticallychange color action bar android studiogreen status bar androidstatus bar text color androidhwhat is the best way to set status bar color in androidchange the status bar color androidstatus bar color in androidandroid status bar text color to darkset color for status bar androidhow to chenge statusbar text and background colour programaticly android studioustatus bar tex color androidstatus bar text color android cssset status bar text color androidhow to change actionbar text color in androidhow to set text color of status bar in androidwhat color is action bar androidstatus bar color change androidandroid status bar color is whitehow to change status bar color of android xmlandroid status bar color transparentshow color on status bar androidandroid studio status bar color themechange status bar color auto place activity in androidaction bar colour androidhow to change status bar color in andoid studiochange status bar icon color androidandroid revert status bar color programmaticallyandroid studio actionbar colorshow to change color of action bar text in android studiostatus bar color transparent androidhow to change top status bar color in androidaction bar text color androidandroid status tool bar colorandroid studio java change status bar color programmaticallyhow to change the color of action bar in android studio using color codehow to change status bar color in android programmaticallyandroid statusbar whitechange color programmatically androidandroid status bar color textandroid change status bar background colorchange status bar text color android programmaticallyandroid status bar white backgroundedditing the status bar color in android studioandroid change status bar color programmaticallychange menu in android actionbar color programmaticallyset toolbar color android programmatically kotlinchaneg the color of status bar i androidset app action bar color androiidhow to change progress bar color in android programmaticallyandroid status bar colorset status bar background color androidedit status bar color android when app is in backgroundwhich attribute is used to change action bar color androidandroid studio change color of status barset status bar color androidset status bar color android xmlhow to change actionbar title color android studioandroid application default status bar color set in android studiochange text color action bar androidchange color status bar activity androidandroid inital actionbar colorhow to change the status bar color to white in androidandroid studio how to change color of status barset actionbar color programmatically androidchange status bar color android kotlinset status bar color white androidchnage statusbar color android show to change action bar background color in android studiochange color of bar above action bar android studiohow to change status bar color of android tset status bar tint color androidhow to remove status bar color in androidstatus bar action mode color androidhow to change action bar text color in android by xmlhow to make status bar color white in androidchange text color of action bar androidactionbar color chnage androidandroid change color of action bar in xmlchange status bar color android javachange color value statusbarcolor android iosstatus bar color not changed in androidhow to change the status bar color from activity in androidhow to change statusbar color in androidchange action bar color xml android studiohow to change background color of actionbar in android studioandroid mvm set window statusbarcolorhow to change color action bar android studiohow to change color in status bar androidandroid studio change color of status bar in an activityhow to change toolbar color and status bar androidhow to change color of menu on action bar androidandroid status bar text color changehow to change color of text of status bar in androidandroid set action bar colorchange color of status bar androidchange status bar icon color android p programmaticallyandroid change color of status bar programmaticallyhow to change status bar color text color in android programmaticallyhow to set status bar color in android xmlhow to change color of action bar in androidhow to change action bar color in android studio xmlset status bar color to default androidhow to change color of action bar in android studiochange color of action bar androidandroid change system status bar colorstatus bar text color androidandroid change system status bar color programmaticallyandroid change status bar text colorstatus bar android change colorchange colour of the default action bar androidandroid studio set status bar colorhow to change default action bar color in androidhow to change actionbar color in android programmaticallyandroid studio how to change action bar colormake status bar white androidhow to change color of status bar in android studiohow to change actionbar color in androidandroid status bar color changechange actionbar color programmatically to theme color androidhow to chenge statusbar text and background colour programaticly android studioandroid change background color programmaticallyhow to set status bar color in androidhow to change android studio status bar text color into blackpredefined actionbar how to color change in android studiohow to change status bar color androidhow to change color of status bar in androidchange status bar color android on dilogchange action bar background color androidandroid style status bar colorhow to change only action bar color and its items androidandroid status bar color whitehow to set status bar colour system defualt in android programmaticallyhow to change color of action bar bg in androidhow to change the action bar color in androidchange color up button action bar androidset color programmatically androidstatus bar text color change androidactivity custom status bar color programmically androidsetting status bar color android on a pageandroid change status bar colorchnage action bar color androiddifferent status bar color androidhow to change the color of status bar android studioandroid change color of status barchange status bar icon color android programmaticallyhow to change the color of the action bar android studioandroid bar color changechange color of status bar android programmaticallyhow to change text color of action bar in android studiohow to change color of status bar text in androidset default statusbar color android programmaticallyandroid studio action bar colorhow to change action bar title color in android programmaticallyandroid status bar text colorandroid status bar color themechange status bar android studioset action bar color androidhow to change status bar color of android t 3dxmlaction bar color change in android studiostatus bar color text androidswiftui 5c status bar colorchange status bar color android programmaticallyhow to make the status bar color white in androidjava android how to set action bar colorset status bar color to white androidhow to change status bar color and heading color in android studioandroid change status bar programmaticallyandroid xml status bar color how to make status bar color blackin androidchange statusbar color androidchange status bar color with activity background color androidshow status bar content in black androidandroid status bar coloandroid developer status bar colorandroid status bar change text colorapp bar doesn color status bar android studiochange status bar color in fragment androidchange status bar in androidmake status bar text color dark androidstatus bar clor change in androidchange color of action bar android studioset status bar color transparent androidandroid status bar content coloraction bar color androidchange color of action bar menu item image androidhow to change action bar title color in android kotlin programmaticallyandroid studio change action bar colorhow to change status bar automatically android programmaticallyset status bar color programmatically androidhow to change the status bar color in androidstatusbar white androidhow to change status bar color in android studioactionbar color android studioandroid status bar color programmaticallystatus bar color android programmaticallyhow to change android studio status bar color into blackhow to make status bar black in androidandroid studio default action bar colorandroid studio status bar colorandroid statusbarcolorset status bar text color android studioandroid change status bar themehow to change status bar color androi dapphow to change text color in action bar androidhow to change color of status bar and text in android programmaticallyandroid change actionbar colorhow to change action bar color in android 11change actionbar color android studiochange status bar and menu bar color androidandroid studio change status bar colorchange color of android status barhow to merge the status bar color in androidandroid change text color actionbarwhite status bar androidchange the status bar color android for api 16status bar background color androidandroid actionbar change text colorchange status bar color android full screenandroid statusbar colorchange actionbar color programmatically androidchange text color actionbar androidhow to change status bar color programmatically in androidchange status bar color androidchange status bar color material androidchange status bar text color android studiohow to change the text color of actionbar in androidcolor action bar androidchange colour of action bar androidandroid action bar title color programmaticallywhy use status bar color androidandroid top status bar color changechange status bar color android studio stylechange text color of action bar android studiohow to change action bar title color in android studioandroid 3a change status bar text color with white 2fblackhow to change status bar color progrmatically in androidhow to change action bar title color in android programmatically kotlinchange status bar text color androidhow to status bar color change i an activityandroid change action bar colorhow to change status bar text color in androidhow to make status bar white on androidandroid change actionbar icon tint stylechange action bar color android studiochange status bar color android studiochange status bar color android programmatically