Browse Source

Improve intro slides style

Arnaud Vergnet 3 years ago
parent
commit
fd44a32b05
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      src/components/Overrides/CustomIntroSlider.js

+ 10
- 2
src/components/Overrides/CustomIntroSlider.js View File

174
         {state.currentSlide === index ? (
174
         {state.currentSlide === index ? (
175
           <View style={{height: '100%', flex: 1}}>
175
           <View style={{height: '100%', flex: 1}}>
176
             <View style={{flex: 1}}>{item.view()}</View>
176
             <View style={{flex: 1}}>{item.view()}</View>
177
-            <Animatable.View animation="fadeIn">
177
+            <Animatable.View useNativeDriver animation="fadeIn">
178
               {index !== 0 && index !== this.introSlides.length - 1 ? (
178
               {index !== 0 && index !== this.introSlides.length - 1 ? (
179
                 <Mascot
179
                 <Mascot
180
                   style={{
180
                   style={{
218
                   borderColor: 'rgba(0,0,0,0.60)',
218
                   borderColor: 'rgba(0,0,0,0.60)',
219
                   borderWidth: 4,
219
                   borderWidth: 4,
220
                   borderRadius: 10,
220
                   borderRadius: 10,
221
+                  elevation: 0,
221
                 }}>
222
                 }}>
222
                 <Card.Content>
223
                 <Card.Content>
223
                   <Animatable.Text
224
                   <Animatable.Text
225
+                    useNativeDriver
224
                     animation="fadeIn"
226
                     animation="fadeIn"
225
                     delay={100}
227
                     delay={100}
226
                     style={styles.title}>
228
                     style={styles.title}>
227
                     {item.title}
229
                     {item.title}
228
                   </Animatable.Text>
230
                   </Animatable.Text>
229
                   <Animatable.Text
231
                   <Animatable.Text
232
+                    useNativeDriver
230
                     animation="fadeIn"
233
                     animation="fadeIn"
231
                     delay={200}
234
                     delay={200}
232
                     style={styles.text}>
235
                     style={styles.text}>
320
   static getIconView(icon: MaterialCommunityIconsGlyphs): React.Node {
323
   static getIconView(icon: MaterialCommunityIconsGlyphs): React.Node {
321
     return (
324
     return (
322
       <View style={{flex: 1}}>
325
       <View style={{flex: 1}}>
323
-        <Animatable.View style={styles.center} animation="fadeIn">
326
+        <Animatable.View
327
+          useNativeDriver
328
+          style={styles.center}
329
+          animation="fadeIn">
324
           <MaterialCommunityIcons name={icon} color="#fff" size={200} />
330
           <MaterialCommunityIcons name={icon} color="#fff" size={200} />
325
         </Animatable.View>
331
         </Animatable.View>
326
       </View>
332
       </View>
355
   getRenderNextButton = (): React.Node => {
361
   getRenderNextButton = (): React.Node => {
356
     return (
362
     return (
357
       <Animatable.View
363
       <Animatable.View
364
+        useNativeDriver
358
         animation="fadeIn"
365
         animation="fadeIn"
359
         style={{
366
         style={{
360
           borderRadius: 25,
367
           borderRadius: 25,
369
   getRenderDoneButton = (): React.Node => {
376
   getRenderDoneButton = (): React.Node => {
370
     return (
377
     return (
371
       <Animatable.View
378
       <Animatable.View
379
+        useNativeDriver
372
         animation="bounceIn"
380
         animation="bounceIn"
373
         style={{
381
         style={{
374
           borderRadius: 25,
382
           borderRadius: 25,

Loading…
Cancel
Save