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

The dot indicator does not change, and the next button goes to 2nd screen #141

Open
Bilal-Abdeen opened this issue May 3, 2023 · 2 comments

Comments

@Bilal-Abdeen
Copy link

Thank you for the excellent library.

I have a strange issue! The dot indicator does not change when the user moves between screens, it always shows the 1st dot indicator as the active one! Moreover, the next button always goes to the 2nd screen in the array. Last, the pageIndexCallback does not return anything!

<Onboarding
	pages={[
		{
			backgroundColor: "red",
			image: <Image source={require("../../images/manager.jpg")} />,
			title: "screen 1",
			subtitle: "screen 1",
		},
		{
			backgroundColor: "red",
			image: <Image source={require("../../images/invite.jpg")} />,
			title: "screen 2",
			subtitle: "screen 2",
		},
		{
			backgroundColor: "red",
			image: <Image source={require("../../images/apply.jpg")} />,
			title: "screen 3",
			subtitle: "screen 3",
		},
	]}
	pageIndexCallback={(pageIndex) => console.log("pageIndex:", pageIndex, )} // does NOT work!?
/>)}
@Bilal-Abdeen
Copy link
Author

I found the solution. <Onboarding /> was inside <SafeAreaView></SafeAreaView>. When I removed the surrounding <SafeAreaView>, everything worked just fine! If this is the intended behaviour, I think the documentation should mention that <Onboarding /> should NOT be enclosed in a <SafeAreaView>.

@VVVi
Copy link

VVVi commented Jun 29, 2023

This problem appears for Android, and was fixed by adding flatlistProps={{ viewabilityConfig: undefined }} to <Onboarding />.

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

2 participants