react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

Inverted behaviour of Android when layout is 'stack'

Open Saad9624 opened this issue 2 years ago • 6 comments

Question.

Is there any fix available for inverted behaviour in android when the layout is stack.Almost tried every way but have no luck.

Screenshot 2021-12-27 at 6 02 16 PM

Saad9624 avatar Dec 27 '21 13:12 Saad9624

Did you figured sth. out? Have the same problem.

nessor avatar Apr 12 '22 17:04 nessor

Did you figured sth. out? Have the same problem.

Still not. Did you figure out anything?

Saad9624 avatar Jun 11 '22 19:06 Saad9624

any update on this ?

hammadwahab12 avatar Jul 20 '22 12:07 hammadwahab12

have the same issue, any luck

anuragfexle avatar Nov 18 '22 06:11 anuragfexle

node_modules -> react-native-snap-carousel -> src -> utils -> animations.js

LINE 3

from

const IS_ANDROID = Platform.OS === 'android';

to

const IS_ANDROID = false;

dhruvpvx avatar Jun 11 '23 15:06 dhruvpvx

This patch fix my issue, thanks @dhruvpvx.

diff --git a/node_modules/react-native-snap-carousel/src/utils/animations.ts b/node_modules/react-native-snap-carousel/src/utils/animations.ts
index bf1c50f..a438f1a 100644
--- a/node_modules/react-native-snap-carousel/src/utils/animations.ts
+++ b/node_modules/react-native-snap-carousel/src/utils/animations.ts
@@ -1,7 +1,7 @@
 import { Platform, Animated } from 'react-native';
 import type { CarouselProps } from 'src/carousel/types';
 
-const IS_ANDROID = Platform.OS === 'android';
+const IS_ANDROID = false;
 
 // Get scroll interpolator's input range from an array of slide indexes
 // Indexes are relative to the current active slide (index 0)

Steps

  1. setup patch-package in your project (see a tutorial)
  2. Make the change in node_modules/react-native-snap-carousel/src/utils/animations.ts
  3. Run npx patch-package react-native-snap-carousel

CristianFigueredo avatar Dec 04 '23 16:12 CristianFigueredo