Answers for "how to change the backgroundcolor of the status bar"

1

how to change status bar color

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));
Posted by: Guest on July-14-2020
0

how to change status bar color

<item name="colorControlNormal">@color/white</item>
        <item name="colorControlActivated">@color/text_color_selected</item>
Posted by: Guest on January-14-2022

Code answers related to "how to change the backgroundcolor of the status bar"

Browse Popular Code Answers by Language