Question : change status bar color android programmatically
Answered by : kushal
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))); } }
Source : | Last Update : Tue, 24 Nov 20
Question : how to change statusbar color for an activity in android studio
Answered by : worried-wren-yqbgpi6tpq4p
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));
Source : https://stackoverflow.com/questions/22192291/how-to-change-the-status-bar-color-in-android | Last Update : Tue, 21 Jul 20
Question : android status bar color
Answered by : calrissian
<!-- in themes -->
<item name="android:statusBarColor">@color/color</item>
Source : | Last Update : Sun, 08 Aug 21
Question : change status bar text color android programmatically
Answered by : stupid-squirrel-3q2jxmq5ve6e
WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
Window window = Activity.getWindow();
View view = window.getDecorView();
// You need androidx.core for this
Source : https://stackoverflow.com/questions/38382283/change-status-bar-text-color-when-primarydark-is-white | Last Update : Mon, 14 Jun 21
Question : change statusbar color for android
Answered by : wrong-warbler-c49q896vbwbm
<StatusBar backgroundColor="orange" />
Source : https://stackoverflow.com/questions/32750260/is-there-a-way-to-change-the-android-status-bar-color-with-react-native/69556716#69556716 | Last Update : Wed, 20 Oct 21