diff --git a/app.config.js b/app.config.js index dcbb0e4597..c151862ab0 100644 --- a/app.config.js +++ b/app.config.js @@ -161,6 +161,7 @@ module.exports = function (config) { './plugins/withAndroidManifestPlugin.js', './plugins/withAndroidManifestFCMIconPlugin.js', './plugins/withAndroidStylesWindowBackgroundPlugin.js', + './plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js', './plugins/shareExtension/withShareExtensions.js', ].filter(Boolean), extra: { diff --git a/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js b/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js new file mode 100644 index 0000000000..704ead054b --- /dev/null +++ b/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js @@ -0,0 +1,28 @@ +const {withStringsXml, AndroidConfig} = require('@expo/config-plugins') + +module.exports = function withAndroidSplashScreenStatusBarTranslucentPlugin( + appConfig, +) { + return withStringsXml(appConfig, function (decoratedAppConfig) { + try { + decoratedAppConfig.modResults = AndroidConfig.Strings.setStringItem( + [ + { + _: 'true', + $: { + name: 'expo_splash_screen_status_bar_translucent', + translatable: 'false', + }, + }, + ], + decoratedAppConfig.modResults, + ) + } catch (e) { + console.error( + `withAndroidSplashScreenStatusBarTranslucentPlugin failed`, + e, + ) + } + return decoratedAppConfig + }) +} diff --git a/src/App.native.tsx b/src/App.native.tsx index f2e0c4f742..cecc49b6b5 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -76,7 +76,6 @@ function InnerApp() { return ( - {isAndroid && }