Das Problem tritt nur auf Android auf, in iOS funktioniert alles einwandfrei.
Wenn ich ein transparentes Modal auf Android öffne, funktioniert es manchmal wie empfohlen, aber manchmal wird es nicht angezeigt, es wird geöffnet, ist aber nicht sichtbar. Wenn das Problem einmal auftritt, tritt es häufig auf, bis ich die App schließe.
Ich denke, das sind alle Pakete, die für das Problem wichtig sind:
- "react-native": "0.78.1"
- "@react-navigation/stack": "^7.2.2"
- "react-native-reanimated": "^3.17.1"
- "react-native-edge-to-edge": "^1.6.0"
Code: Select all
const SharedModalTransition: StackNavigationOptions = {
presentation: 'transparentModal',
transitionSpec: {
open: {
animation: 'spring',
config: {
stiffness: 1000,
damping: 500,
mass: 3,
overshootClamping: true,
restDisplacementThreshold: 10,
restSpeedThreshold: 10,
},
},
close: {
animation: 'spring',
config: {
stiffness: 800,
damping: 700,
mass: 4,
overshootClamping: true,
restDisplacementThreshold: 10,
restSpeedThreshold: 10,
},
},
},
cardStyleInterpolator: forFade,
};
Mobile version