Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Churikova Tetiana
2020-03-26 10:36:21 +01:00
committed by Andrey Shovkoplyas
parent a447bed4ac
commit 68f0a02cbc
16 changed files with 56 additions and 63 deletions
@@ -108,6 +108,17 @@ public class MainActivity extends ReactFragmentActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
case Configuration.UI_MODE_NIGHT_YES:
setTheme(R.style.DarkTheme);
break;
case Configuration.UI_MODE_NIGHT_NO:
setTheme(R.style.LightTheme);
break;
default:
setTheme(R.style.LightTheme);
}
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this);