1// for my fellow react-native developers
2// add this in styles.xml
3<resources>
4 <!-- Base application theme. -->
5 <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
6 <!-- Customize your theme here. -->
7 <item name="android:textColor">#000000</item>
8 <item name="android:windowDisablePreview">true</item>
9 <item name="android:windowBackground">#000000</item>
10 <item name="android:colorBackground">#000000</item>
11 <item name="android:statusBarColor">#000000</item>//<--add_this
12 </style>
13
14</resources>
1 public void statuscolor(){
2 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
3 Window window = getWindow();
4 window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
5 window.setStatusBarColor(Color.parseColor(getPreferences().getString(Constant.SECONDARY_COLOR, Constant.SECONDARY_COLOR)));
6 }
7 }
1WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
2Window window = Activity.getWindow();
3View view = window.getDecorView();
4
5// You need androidx.core for this
1getSherlockActivity().getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xff00ACED));
2mActionBar.setBackgroundDrawable(new ColorDrawable(0xff00DDED));
3mActionBar.setDisplayShowTitleEnabled(false);
4mActionBar.setDisplayShowTitleEnabled(true);