react-native-pager-view
react-native-pager-view copied to clipboard
Feat: Page Indicator Props
Summary
Closed out https://github.com/callstack/react-native-pager-view/issues/98 and addressed https://github.com/callstack/react-native-pager-view/pull/131
- What is the feature?: We can now set active and inactive dot colors
- How did you implement the solution?
- Passing in a hex string from RN to Native module and using UIColor to set active/inactive colors.
- What areas of the library does it impact?
- Pagination dots
Test Plan
Tested on both a real device and simulators. I've enabled dots in the basic example and we can see the dots and custom colors.
What are the steps to reproduce (after prerequisites)?
set props of pageIndicatorProps={{ activeDotColor: 'red', inactiveDotColor: 'blue' }} and you should see the changes
Compatibility
| OS | Implemented |
|---|---|
| iOS | ✅ |
| Android | ❌ |
Checklist
- [X] I have tested this on a device and a simulator
- [X] I added the documentation in
README.md - [X] I updated the typed files (TS and Flow)
@callstack ping
@troZee any chance we can get your eyes on this? or who would be the best person?
I'm looking forward to this feature as well, I'm creating a demoApp that contains white bg, without this feature the active dots simply disappear, so, we need this in order to control the color of the active/inactive dots.
Any update on this? It would be very useful for the project I'm working on currently.
I'm kind of baffled why this is not reviewed and merged. I mean, this probably is one of the very first issues @callstack would have noticed if they actually use this library in their projects. Yeah yeah fork it and make your own fixes ffs.
The reason this wasn't merged is most likely because it doesn't include an Android implementation.
It's also easy to make your own custom indicator. You don't necessarily need to use the built-in one.
@andreialecu Can you show an example on how to make your own indicator please? I cant seem to be able to access the index
Closing this due to inactivity by the repository maintainers.
Please reopen, this would be really useful!