android status bar color

 public void statuscolor(){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.parseColor(getPreferences().getString(Constant.SECONDARY_COLOR, Constant.SECONDARY_COLOR)));
        }
    }

3.5
4
Jinawee 90 points

                                    WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
Window window = Activity.getWindow();
View view = window.getDecorView();

// You need androidx.core for this

3.5 (4 Votes)
0
3.7
10
Sixie6e 90 points

                                    Window window = activity.getWindow();

// clear FLAG_TRANSLUCENT_STATUS flag:
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);

// add FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag to the window
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

// finally change the color
window.setStatusBarColor(ContextCompat.getColor(activity,R.color.my_statusbar_color));

3.7 (10 Votes)
0
4.07
8

                                    getWindow().setStatusBarColor(ContextCompat.getColor(BookReaderActivity.this, R.color.black));
View decorView = getWindow().getDecorView(); //set status background black 
decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); //set status text  light

4.07 (27 Votes)
0
4.3
10
Qedpi 105 points

                                     <!-- in themes -->
<item name="android:statusBarColor">@color/color</item>

4.3 (10 Votes)
0
0
0
BryKKan 95 points

                                    // for my fellow react-native developers
// add this in styles.xml
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="android:textColor">#000000</item>
        <item name="android:windowDisablePreview">true</item>
        <item name="android:windowBackground">#000000</item>
        <item name="android:colorBackground">#000000</item>
        <item name="android:statusBarColor">#000000</item>//<--add_this
    </style>

</resources>

0
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
android change color of status bar programmatically android change colour of status bar status bar color not changed in android how to change android studio status bar text color into black how to change android studio status bar color into black how to change status bar text to dark android how to change the text color of the statusbar android studio android status bar color text how to change toolbar color and status bar android android studio status bar color theme android statusbarColor change color status bar activity android how to change status bar color in andoid studio change status bar color android java android status bar status bar background android android studio change status bar color status bar color android studio android change status bar theme change the status bar color android for api 16 change status bar and menu bar color android change status bar android status bar color kotlin statusbar white android how to change status bar color android how to change status bar color of android xml how to change status bar color of android t=xml how to change status bar color of android t android xml status bar color android status bar content color android status bar color status bar color transparent android change status bar color in fragment android kotlin status bar color status bar white color black android FROM STYLE change statusbar text kotlin android how to make status bar color blackin android how to make status bar color white in android how to change status bar color programmatically in android change color value statusbarcolor android ios android developer status bar color change status bar color for different activity in android white status bar android kotlin how to change status bar color and heading color in android studio android set status bar color programmatically change status bar color android stusio how to change color of text of status bar in android android studio status bar color Android text color of status bar how to change the status bar color from activity in android set default statusbar color android programmatically android status bar white style change background color of status bar in android android status bar text color android status tool bar color android status bar white background edditing the status bar color in android studio change status bar color auto place activity in android android kotlin change status bar color kotlin set color of status bar android change status bar text color change status bar text color android studio change status bar android studio change statusbar text color android change status bar color android studio style green status bar android edit status bar color android when app is in background how to change statusbar color in android set status bar color to default android how to change status bar color in for activity android set status bar tint color android only change in statusbar color kotlin set status bar color to white android status bar text color android css show status bar content in black android make status bar color white in whole application in android how to merge the status bar color in android android change status bar color programmatically android style status bar color how to change status bar color to white in android programmatically how to change bottom status bar color in android how to change status bar color progrmatically in android change status bar color android theme change status bar icon color android change status bar in android android change system status bar color programmatically android change system status bar color android status bar text color change android status bar color change android bar color change change status bar color android studio android change status bar color and icon color android studio set status bar color how to status bar color change in an activity how to status bar color change i an activity android status bar color white activity custom status bar color programmically android how to change color in status bar android android change status bar color android change status bar background color status bar color in android android change status bar programmatically change status bar color programmatically android android status bar color kotlon hwhat is the best way to set status bar color in android 01 hwhat is the best way to set status bar color in android android top status bar color change how to change the status bar color to white in android how to make the status bar color white in android how to change top status bar color in android change the color of status bar in android kotlin chaneg the color of status bar i android how to change status bar color in android programmatically android status bar color theming android statusbar color theme style android status bar color theme android statusbar color theme how to change status bar color in andoird how to set text color of status bar in android change color of android status bar change color of status bar android programmatically match color of status bar with activity color android studio change status bar icons color android programmatically different status bar color android make status bar text black android change statusbar color android status bar clor change in android set status bar color programmatically android how to change color of status bar and text in android programmatically how to change color of status bar text in android status bar color android programmatically app bar doesn color status bar android studio change status bar icon color change android programmatically change status bar color material android set status bar text color android studio status bar text color change android status bar color change android studio how to set statusbar colour in android xml change status bar text color android programmatically how to change the color of the status bar android swiftui\ status bar color android studio java change status bar color programmatically how to change status bar color android java status bar color not changing android change status bar icon color android programmatically change status bar color android full screen status bar color programmatically android change status bar color android kotlin show color on status bar android status bar color change android how to change the color of status bar programatically in android studio change status bar text color android how to change status bar color in kotlin status bar android change color android change color of status bar change status bar background color android set color for status bar android set status bar background color android how to change status bar color androi dapp how to change status bar text color in android set status bar color android xml android studio change color of status bar in an activity android studio change color of status bar how to make status bar white on android kotlin change status bar color activity.window.statusBarColor changing status bar color android change color programmatically android chang status bar color kotlin chang status bar color how to change the top bar color on android chande ststus barcolor android andoid change color of status bar android status bar color programmatically change the status bar color android developer android black status bar set status bar text color android change the status bar color android how to change progress bar color in android programmatically how to change status bar automatically android change status bar color for each activity android kotlin make statusbar activity status bar color android dev edit status bar how to change notification bar color in android status bar textchange androi how to change status bar automatically android programmatically status bar color android kotlin change color text of system bar android why action bar color doesn't change in mobile device but works in emulator signal status bar color rgb ui design andiord status bar color give status bar color android android studio status bar text color same status bar color as per the layout android cusotm satus bar color android change status bar color android studio activity change status bar color android activity android status bar colorchange how to override android statusbar color set status bar color android java change status bar color status bar based on theme xml android mvm set window statusbarcolor android set window status color from viewmodel change status bar color android programmatically android studio change color notification bar status bar text color android android status bar multiple colors status bar multiple colors android status bar dual colors android status bar 2 colors android statusbar color android studip how to change color of status bar top how to change color of status bar in android how to change status bar style in android studio change color of notification bar android studio status bar style android status bar change color how to set the color on items on the windows status bar android kotlin android recolor status bar custom status bar color android android status bar no color android change topbar color in app Status Bar Color Changer android custom status bar color android studio change battery network bar color how to change the color of notification bar in android studio how to set status bar color in android setting notification bar color in android styles how to set notification bar color in android how to set dark status bar in android how to style status bar in android studio java how to style status bar in android studio android studio change color of top bar status bar background color android statusbar color android kotlin set status bar color android style set top indicator android color status bar text color white android how to change the color of the notification bar on android studio style status bar android android statusbar color standard status bar color android change android status bar color change background color of status bar kotlin change status bar color kotlin how to set color of status bar in android how to change the color of status bar in android change statusbar color in android studio how to change status bar color in android studio how to change the color od status bat in android change color of status bar text android set time bar android how to change status bar clor in android change color status bar android set status bar color in android change status bar color android how to change the status bar color in android android set statusbar color set the color of text in status bar and navigation bar android change color of status bar android change top bar color android android change top bar color change status bar color and navigation status bar android kotlin how to change status bar color in android set status bar color android status bar color android app background on status bar android change color of notification bar android android kotlin topbar color android topbar color android set status bar color how to change status bar color android status bar color
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source