Set status bar style with theme
Instead of making it full screen then changing on js start, we can use the same theme as in app Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
723975d2c9
commit
fd8558421d
|
@ -127,7 +127,7 @@ public class MainActivity extends ReactFragmentActivity
|
||||||
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
|
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
|
||||||
|
|
||||||
setSecureFlag();
|
setSecureFlag();
|
||||||
SplashScreen.show(this, true);
|
SplashScreen.show(this, R.style.AppTheme);
|
||||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||||
super.onCreate(null);
|
super.onCreate(null);
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,19 @@
|
||||||
<item name="android:windowBackground">?attr/backgroundColor</item>
|
<item name="android:windowBackground">?attr/backgroundColor</item>
|
||||||
<item name="android:textColor">?attr/textColor</item>
|
<item name="android:textColor">?attr/textColor</item>
|
||||||
<item name="android:forceDarkAllowed">true</item>
|
<item name="android:forceDarkAllowed">true</item>
|
||||||
|
<item name="android:windowTranslucentStatus">true</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="LightTheme" parent="AppTheme">
|
<style name="LightTheme" parent="AppTheme">
|
||||||
<item name="textColor">#000000</item>
|
<item name="textColor">#000000</item>
|
||||||
<item name="backgroundColor">#ffffff</item>
|
<item name="backgroundColor">#ffffff</item>
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkTheme" parent="AppTheme">
|
<style name="DarkTheme" parent="AppTheme">
|
||||||
<item name="textColor">#ffffff</item>
|
<item name="textColor">#ffffff</item>
|
||||||
<item name="backgroundColor">#000000</item>
|
<item name="backgroundColor">#000000</item>
|
||||||
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue