Answers for "how to change color of status bar in android studio"

0

change status bar color android

// 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>
Posted by: Guest on May-21-2021
0

change status bar color android programmatically

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)));
        }
    }
Posted by: Guest on November-17-2020
0

android status bar color

<!-- in themes -->
<item name="android:statusBarColor">@color/color</item>
Posted by: Guest on August-01-2021
0

change statusbar color for android

<StatusBar backgroundColor="orange" />
Posted by: Guest on October-13-2021

Code answers related to "how to change color of status bar in android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language