TransparentModal lässt sich auf Android nicht mehr öffnenAndroid

Forum für diejenigen, die für Android programmieren
Anonymous
 TransparentModal lässt sich auf Android nicht mehr öffnen

Post by Anonymous »

Ich habe meine React Native-App auf eine neue Architektur umgestellt und habe jetzt das Problem: Ich kann „presentation: transparentModal“ nicht wie zuvor verwenden. Ich brauche das transparente, weil Modal den vorherigen Bildschirm dahinter nicht anzeigt.
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,
};

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post