Skip to content

Conversation

developer1700
Copy link

No description provided.

added RTL support
added RTL support
added RTL support
added RTL support
@kolking
Copy link
Owner

kolking commented Oct 13, 2024

Not quite sure I understood the purpose of this PR. As for me, the rtl prop makes no sense.

const App = () => {
const { width, height } = useWindowDimensions();
const scrollX = useRef(new Animated.Value(0)).current;
const scrollX = useRef(new Animated.Value(rtl ? width * (pages.length - 1) : 0)).current;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, this helped me save a lot of time. I just used bun patch to generate a patch for my app.

I also needed to change the default value depending on iOS/Android. For some reason on iOS the slider still works from LTR while the ScrollView works RTL, so I used 0 for iOS and windowWidth * (pageLengt-1) for Android.

Do you know how to make the indicator work RTL on iOS as well?

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

Successfully merging this pull request may close these issues.

3 participants