react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

I18nManager.forceRTL(true);

Open HananeAlSamrout opened this issue 9 years ago • 10 comments

please fix the module in case the direction becomes from right to left using I18nManager.forceRTL(true);

HananeAlSamrout avatar Dec 14 '16 14:12 HananeAlSamrout

+1 @HananeAlSamrout Did you find any solution to that? BTW, it works well on Android

nirshubz avatar Jan 15 '17 17:01 nirshubz

Swiper uses the ViewPagerAndroid on android and it supports RTL layout, but on iOS it use ScrollView and it has problems with RTL layout

To fix this problem, add a style like this:

<Swiper style={{ flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row' }}>
  ...
</Swiper>

dastoori avatar Feb 10 '17 11:02 dastoori

@dastoori thanks for sharing this but the problem is you want also to change buttons , dots .. and the wrapper flexDirection style .. I made all the changes it might help some one https://gist.github.com/phpfalcon/2939d87fc31b698c86d1f103850eec51

BSN4 avatar Mar 03 '17 09:03 BSN4

@phpfalcon I don't think that your solution works for some reason.

anonrig avatar Mar 06 '17 10:03 anonrig

@anonrig I made some changes it appears that style not applied to the tag I've tested it now it should working fine https://gist.github.com/phpfalcon/2939d87fc31b698c86d1f103850eec51

BSN4 avatar Mar 09 '17 13:03 BSN4

https://github.com/bilalsyed001/react-native-swiper/commit/e3a3126a59562548aa959f548a4aad7653ad87ad

bilalsyed001 avatar Mar 16 '18 12:03 bilalsyed001

bilalsyed001@e3a312 hi bilal, i have implemented your fix it works fine , but when isRTl = true is android platform , the indexes are reversed (it is well displayed but indexes are reversed)

developersHomefriend avatar Sep 26 '18 12:09 developersHomefriend

Is there any solution so far ??

mohmdalfaha avatar Apr 21 '19 03:04 mohmdalfaha

bilalsyed001@e3a312 hi bilal, i have implemented your fix it works fine , but when isRTl = true is android platform , the indexes are reversed (it is well displayed but indexes are reversed)

@developersHomefriend @mohmdalfaha, Happen to me too, any advise?

barak109 avatar Apr 23 '20 07:04 barak109

Created an updated fork that support RTL Check it out here: https://github.com/chenop/react-native-swiper

To use:

  1. in package.json:
"dependencies": {
    ...
    "react-native-swiper": "https://github.com/chenop/react-native-swiper",
}
  1. yarn && pod install

chenop avatar Sep 17 '22 08:09 chenop