Fix android splash jump (#3316)
* Setup translucent status bar of splash screen on android (#3300) Co-authored-by: Eric Bailey <git@esb.lol> * Fix conflict better --------- Co-authored-by: Eiichi Yoshikawa <edo@bari-ikutsu.com>
This commit is contained in:
parent
396d183dfc
commit
7503d83eaa
3 changed files with 29 additions and 3 deletions
28
plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js
Normal file
28
plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js
Normal file
|
@ -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
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue