diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-03-06 19:38:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 19:38:48 +0900 |
commit | f3db23a3b14e9444cb499c727b9d62c414e5a840 (patch) | |
tree | 4b9f39447c7c53d2baf3dd4029b2f8ea30e3c9b1 /plugins/withAndroidStylesWindowBackgroundPlugin.js | |
parent | 0c6a82062f9c9c47338fe50f0ef37a1c068939c2 (diff) | |
parent | eb298d2e60a0ddf26ebaf8f27373418bbf7769e3 (diff) | |
download | voidsky-f3db23a3b14e9444cb499c727b9d62c414e5a840.tar.zst |
Merge branch 'bluesky-social:main' into patch-3
Diffstat (limited to 'plugins/withAndroidStylesWindowBackgroundPlugin.js')
-rw-r--r-- | plugins/withAndroidStylesWindowBackgroundPlugin.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/withAndroidStylesWindowBackgroundPlugin.js b/plugins/withAndroidStylesWindowBackgroundPlugin.js new file mode 100644 index 000000000..427f43df0 --- /dev/null +++ b/plugins/withAndroidStylesWindowBackgroundPlugin.js @@ -0,0 +1,20 @@ +const {withAndroidStyles, AndroidConfig} = require('@expo/config-plugins') + +module.exports = function withAndroidStylesWindowBackgroundPlugin(appConfig) { + return withAndroidStyles(appConfig, function (decoratedAppConfig) { + try { + decoratedAppConfig.modResults = AndroidConfig.Styles.assignStylesValue( + decoratedAppConfig.modResults, + { + add: true, + parent: AndroidConfig.Styles.getAppThemeLightNoActionBarGroup(), + name: 'android:windowBackground', + value: '@drawable/splashscreen', + }, + ) + } catch (e) { + console.error(`withAndroidStylesWindowBackgroundPlugin failed`, e) + } + return decoratedAppConfig + }) +} |