Answers for "how to change status bar color of android xml"

1

android status bar color theming style light xml

<item name="android:statusBarColor">@color/colorPrimaryDark</item>
<item name="android:windowLightStatusBar">true</item>
Posted by: Guest on April-28-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

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

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language