-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/tamagui_landing_page' of https://github.com/andrew…
…-bierman/PackRat into feat/tamagui_landing_page
- Loading branch information
Showing
74 changed files
with
1,315 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @module withSplashWindowIsTranslucent | ||
* @description Custom expo plugin that makes the {@link https://developer.android.com/develop/ui/views/launch/splash-screen/migrate|default splash screen (android 12+)} transparent. | ||
* This is a temporary work around for the {@link https://github.com/zoontek/react-native-bootsplash/issues/496|double splash screen issue}. | ||
* | ||
* | ||
* Credits: {@link https://github.com/expo/expo/issues/16084#issuecomment-1261330440} | ||
*/ | ||
|
||
const { AndroidConfig, withAndroidStyles } = require('@expo/config-plugins'); | ||
|
||
const withSplashWindowIsTranslucent = (config) => { | ||
return withAndroidStyles(config, async (config) => { | ||
config.modResults = await configureFullScreenDialog(config.modResults); | ||
return config; | ||
}); | ||
}; | ||
|
||
async function configureFullScreenDialog(styles) { | ||
const splashScreen = styles.resources.style.find( | ||
(style) => style.$.name === 'Theme.App.SplashScreen', | ||
); | ||
|
||
if (splashScreen) { | ||
splashScreen.item = splashScreen.item.filter( | ||
(item) => item.$.name !== 'android:windowIsTranslucent', | ||
); | ||
splashScreen.item.push( | ||
AndroidConfig.Resources.buildResourceItem({ | ||
name: 'android:windowIsTranslucent', | ||
value: true, | ||
}), | ||
); | ||
} | ||
|
||
return styles; | ||
} | ||
|
||
module.exports = withSplashWindowIsTranslucent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.