diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js b/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js new file mode 100644 index 000000000..704ead054 --- /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 + }) +} |