Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL swipe direction not working on Android #767

Open
alwathan opened this issue Sep 4, 2023 · 5 comments
Open

RTL swipe direction not working on Android #767

alwathan opened this issue Sep 4, 2023 · 5 comments

Comments

@alwathan
Copy link

alwathan commented Sep 4, 2023

Environment

"react-native-pager-view": "^6.2.1",
"react-native": "0.72.4",
"expo": "~49.0.8",

Description

RTL swipe direction not working on Android.

This is my script

import React from "react";
import {I18nManager, StyleSheet, View, Text } from "react-native";
import PagerView from "react-native-pager-view";

I18nManager.allowRTL(true);
I18nManager.forceRTL(true);
I18nManager.swapLeftAndRightInRTL(true);

const Pager = () => {
  return (
    <PagerView style={styles.pagerView} initialPage={0} layoutDirection={"rtl"}>
      <View key="1">
        <Text>First page</Text>
      </View>
      <View key="2">
        <Text>Second page</Text>
      </View>
    </PagerView>
  );
};

const styles = StyleSheet.create({
  pagerView: {
    flex: 1,
  },
});

export default Pager;

Demo

@sepperousseau
Copy link

@alwathan Did you add android:supportsRtl="true" to your AndroidManifest? For me this fixed the issue.

@alwathan
Copy link
Author

@sepperousseau I am using expo

@omarZaoujal99
Copy link

omarZaoujal99 commented Jan 31, 2024

same here, layoutDirection="rtl" not working in android, even if android:supportsRtl="true"

"expo": "~49.0.13",
"react-native": "0.72.5",
"react-native-pager-view": "6.2.0",

@hasan642
Copy link

hasan642 commented Mar 7, 2024

no solution yet?
the swipe direction is inverted on Android

@github-id01
Copy link

any solution for this ? Am using expo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants