react-native-pager-view icon indicating copy to clipboard operation
react-native-pager-view copied to clipboard

Feat: Page Indicator Props

Open mssodhi opened this issue 4 years ago • 7 comments

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.

Screen Shot 2021-06-16 at 11 45 27 AM

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)

mssodhi avatar Jun 16 '21 18:06 mssodhi

@callstack ping

paulomcnally avatar Jun 28 '21 18:06 paulomcnally

@troZee any chance we can get your eyes on this? or who would be the best person?

mssodhi avatar Jun 30 '21 01:06 mssodhi

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.

wilsolutions avatar Aug 20 '21 16:08 wilsolutions

Any update on this? It would be very useful for the project I'm working on currently.

brianacowles avatar Jan 21 '22 18:01 brianacowles

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.

russeg avatar Jul 05 '22 01:07 russeg

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 avatar Jul 05 '22 07:07 andreialecu

@andreialecu Can you show an example on how to make your own indicator please? I cant seem to be able to access the index

pouyarezvani avatar Aug 12 '22 06:08 pouyarezvani

Closing this due to inactivity by the repository maintainers.

mssodhi avatar Sep 07 '22 18:09 mssodhi

Please reopen, this would be really useful!

chetan51 avatar Sep 19 '22 02:09 chetan51