Browse Source

Tried to fix image modal animation

Arnaud Vergnet 4 years ago
parent
commit
46dfbb1048

+ 1
- 1
package.json View File

@@ -44,7 +44,7 @@
44 44
     "react-native-calendars": "^1.260.0",
45 45
     "react-native-collapsible": "^1.5.2",
46 46
     "react-native-gesture-handler": "~1.6.0",
47
-    "react-native-image-modal": "^1.0.1",
47
+    "react-native-image-modal": "^1.0.4",
48 48
     "react-native-modalize": "^1.3.6",
49 49
     "react-native-paper": "^3.8.0",
50 50
     "react-native-reanimated": "~1.7.0",

+ 1
- 0
src/components/Home/FeedItem.js View File

@@ -74,6 +74,7 @@ class FeedItem extends React.Component<Props> {
74 74
                 {hasImage ?
75 75
                     <View style={{marginLeft: 'auto', marginRight: 'auto'}}>
76 76
                         <ImageModal
77
+                            isTranslucent={Platform.OS === 'android'}
77 78
                             resizeMode="contain"
78 79
                             imageBackgroundColor={"#000"}
79 80
                             style={{

+ 1
- 0
src/screens/Amicale/Clubs/ClubDisplayScreen.js View File

@@ -126,6 +126,7 @@ class ClubDisplayScreen extends React.Component<Props, State> {
126 126
                         marginBottom: 10,
127 127
                     }}>
128 128
                         <ImageModal
129
+                            isTranslucent={Platform.OS === 'android'}
129 130
                             resizeMode="contain"
130 131
                             imageBackgroundColor={this.colors.background}
131 132
                             style={{

+ 1
- 0
src/screens/FeedItemScreen.js View File

@@ -67,6 +67,7 @@ class FeedItemScreen extends React.Component<Props> {
67 67
                 {hasImage ?
68 68
                     <View style={{marginLeft: 'auto', marginRight: 'auto'}}>
69 69
                         <ImageModal
70
+                            isTranslucent={Platform.OS === 'android'}
70 71
                             resizeMode="contain"
71 72
                             imageBackgroundColor={"#000"}
72 73
                             style={{

+ 3
- 0
src/screens/HomeScreen.js View File

@@ -17,6 +17,7 @@ import MaterialHeaderButtons, {Item} from "../components/Custom/HeaderButton";
17 17
 import {AnimatedValue} from "react-native-reanimated";
18 18
 import AnimatedFAB from "../components/Custom/AnimatedFAB";
19 19
 import AnimatedFocusView from "../components/Custom/AnimatedFocusView";
20
+import {SafeAreaView} from "react-native-safe-area-context";
20 21
 // import DATA from "../dashboard_data.json";
21 22
 
22 23
 
@@ -471,6 +472,7 @@ class HomeScreen extends React.Component<Props, State> {
471 472
     render() {
472 473
         const nav = this.props.navigation;
473 474
         return (
475
+            <SafeAreaView style={{flex: 1,}}>
474 476
             <AnimatedFocusView
475 477
                 {...this.props}
476 478
             >
@@ -490,6 +492,7 @@ class HomeScreen extends React.Component<Props, State> {
490 492
                     onPress={this.openScanner}
491 493
                 />
492 494
             </AnimatedFocusView>
495
+            </SafeAreaView>
493 496
         );
494 497
     }
495 498
 }

+ 1
- 0
src/screens/Planning/PlanningDisplayScreen.js View File

@@ -91,6 +91,7 @@ class PlanningDisplayScreen extends React.Component<Props, State> {
91 91
                 {this.displayData.logo !== null ?
92 92
                     <View style={{marginLeft: 'auto', marginRight: 'auto'}}>
93 93
                         <ImageModal
94
+                            isTranslucent={Platform.OS === 'android'}
94 95
                             resizeMode="contain"
95 96
                             imageBackgroundColor={this.colors.background}
96 97
                             style={{

Loading…
Cancel
Save