Code Monkey home page Code Monkey logo

react-native-animated-pagination-dots's People

Contributors

fjmorant avatar harin329 avatar kriss-u avatar weahforsage avatar yaohuiji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-animated-pagination-dots's Issues

activeDotColor prop

Update documentation with the prop activeDotColor for Expanding dot, to change the color style for active dots.

ScalingDot using screen width.

Hello, I have a screen in my react native app that is using scaling dots within a box, however the scaling dots is using screen width so the dots are updating at the wrong points.

I can fix this locally by adding containerWidth as an optional prop. This defaults to width if not passed.

Is this something that we can add?

Max Number of dots

Can we have max number of dots to render ? because when there're lots of images, it doesn't look good to have lot of dots. Would be good if we could restrict the max number.

Error: Tried to register two views with the same name RNSVGSvgView

Got error from running an example from readme

Error: Requiring module "node_modules/react-native-animated-pagination-dots/src/index.tsx", which threw an exception: Invariant Violation: Tried to register two views with the same name RNSVGSvgView

react-native 0.64.3

Two product card in one page

I see the example and it only one card in a time. What if i have two card in one page and still want to have dot indicator?

Problem when the device rotates

Hi @weahforsage ,
it seems that when the device rotates or is rotated, the pagination no longer works, I also tried with your example, but it gives problems.

I don't know if the problem is: const {width} = Dimensions.get('screen');, that when the device rotates it doesn't update its dimensions or anything.

Cannot Show "Dots" inside ScrollView

hello, thank you for making awesome plugin.

i have some problem, when i try to put inside "ScrollView" the "Dots" not showing but still can slide, i try many things and not work also, if someone have some issue like me please help me to fix it

thank you.

Add an option to define the width in which SlidingDot operates

Currently SlidingDot operates on the screen width, though I'm using it on a card with images being narrower than a window width.

On image scroll I have to replace

onProgressChange={(offsetProgress) => scrollX.setValue(-offsetProgress)}

with

onProgressChange={(offsetProgress) =>
  scrollX.setValue(
    -offsetProgress * (windowWidth / imageWidth)
    + (windowWidth - imageWidth) * (MARGIN_SIZE / windowWidth)
  )
}
// ...
<SlidingDot marginHorizontal={MARGIN_SIZE} {...otherProps} />

Giving an ability to change the inputRange to [-imageWidth, 0, imageWidth] I'll be able to skip this sophisticated scaling.

Use the ExpandingDot wihtout the FLatList

Hello
I would like to pass MaxPages and currentPage to the ExpandingDot component and control the pagination programmatically by updating the currentPage value.

I have tried to add this custom feature but without success.
Can you please give me some hints that can help me proceed.

I will post the final code if i achieved it here.

Thanks.

Programmatically scroll?

Thanks for this amazing component! Would it be possible to programmatically scroll to the next page upon pressing a button for example?

Using LiquidLike Dots Error

Using LiquidLike dots always gives an error :
TypeError: undefined is not an object (evaluating 'scrollOffset.interpolate')

For Vertically Expanding Dot

Currently, ExpandingDot only expands horizontally but how to achieve a vertically expanding dot.

For this, I used a prop isVerticle in ExpandingDot.

Attached, the patch-package if someone needs it.

diff --git a/node_modules/react-native-animated-pagination-dots/src/dots/ExpandingDot.tsx b/node_modules/react-native-animated-pagination-dots/src/dots/ExpandingDot.tsx
index 14895e1..9495aef 100644
--- a/node_modules/react-native-animated-pagination-dots/src/dots/ExpandingDot.tsx
+++ b/node_modules/react-native-animated-pagination-dots/src/dots/ExpandingDot.tsx
@@ -15,6 +15,7 @@ export interface ExpandingDotProps {
   inActiveDotColor?: string;
   expandingDotWidth?: number;
   activeDotColor?: string;
+  isVerticle?: boolean;
 }
 
 const ExpandingDot = ({
@@ -26,6 +27,7 @@ const ExpandingDot = ({
   inActiveDotColor,
   expandingDotWidth,
   activeDotColor,
+  isVerticle,
 }: ExpandingDotProps) => {
   const { width } = useWindowDimensions();
 
@@ -35,6 +37,7 @@ const ExpandingDot = ({
     expandingDotWidth: expandingDotWidth || 20,
     dotWidth: (dotStyle.width as number) || 10,
     activeDotColor: activeDotColor || '#347af0',
+    isVerticle: isVerticle ? isVerticle :  false,
   };
 
   return (
@@ -80,7 +83,7 @@ const ExpandingDot = ({
             style={[
               styles.dotStyle,
               dotStyle,
-              { width: expand },
+              defaultProps.isVerticle ? { height: expand, alignSelf: 'center' } : { width : expand },
               { opacity },
               { backgroundColor: colour },
             ]}

SlidingDots - java.lang.IllegalStateException

Hi, I am recently using this awesome library, but I experience a crash on SlidingDots.

Here is the error stack:

java.lang.IllegalStateException: com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 155 could not be found.

Any idea what went wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.