-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Fix transition blink on Android
- Loading branch information
1 parent
7b72fa4
commit 130cfbc
Showing
6 changed files
with
13 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,22 +21,10 @@ The following versions or react-navigation and the stack navigator are supported | |
| [2.x](https://github.com/IjzerenHein/react-navigation-shared-element/tree/v2) | 3 & 4 | This version is compatible with `react-navigation-stack@2`. | | ||
| [1.x](https://github.com/IjzerenHein/react-navigation-shared-element/tree/v1) | 3 & 4 | This version is compatible with `react-navigation-stack@1`. | | ||
|
||
Not supported: | ||
## Things to know | ||
|
||
- [ ] [react-native-screens/createNativeStackNavigator](https://github.com/IjzerenHein/react-navigation-shared-element/issues/14) | ||
|
||
## Known issues | ||
|
||
Navigating to a screen on Android causes the target element to blink when unhiding. This problem needs to be investigated further, but can be worked around by [disabling `react-native-screens` explicitly](./example/src/App.tsx#L50-L55). | ||
|
||
```jsx | ||
import { Platform } from 'react-native'; | ||
|
||
// As of [email protected], enableScreens causes a fade-in of the image when navigating to a screen. | ||
// And as of react-native-screens@3, enableScreens is enabled by default. | ||
// Disable screens on Android until this issue has been resolved. | ||
enableScreens(Platform.OS !== "android"); | ||
``` | ||
- `react-navigation-shared-element` uses the [JS based Stack Navigator](https://reactnavigation.org/docs/stack-navigator). The [Native Stack Navigator](https://reactnavigation.org/docs/native-stack-navigator) is not yet supported and it is not yet clear whether this can be supported in the future. | ||
- On [detaching inactive screens](https://reactnavigation.org/docs/stack-navigator/#detachinactivescreens) a blink may occur on Android. Because of this `detachInactiveScreens` is set to `false` by default on Android. | ||
|
||
## Demo App | ||
|
||
|
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 |
---|---|---|
|
@@ -47,13 +47,6 @@ if (Platform.OS === "android") { | |
StatusBar.setBackgroundColor("transparent"); | ||
} | ||
|
||
// As of [email protected], enableScreens causes | ||
// a fade-in of the image when navigating to a screen. | ||
// And as of react-native-screens@3, enableScreens is enabled by default. | ||
// Therefore, explicitly disable screens on Android until this issue | ||
// has been resolved. | ||
enableScreens(Platform.OS !== "android"); | ||
|
||
export default () => ( | ||
<SafeAreaProvider> | ||
<Tests> | ||
|
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