GithubHelp home page GithubHelp logo

kyo504 / react-native-marquee Goto Github PK

View Code? Open in Web Editor NEW
193.0 4.0 29.0 898 KB

React Native Marquee Text Component

License: MIT License

JavaScript 4.82% Java 24.33% Objective-C 7.46% TypeScript 50.26% Ruby 7.74% Shell 1.70% Objective-C++ 3.69%
react-native ios android marquee

react-native-marquee's People

Contributors

alangumer avatar dimamklk avatar ithustle avatar kyo504 avatar teaualune 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-marquee's Issues

Show static text instead of animated text when contentFits is true

I faced the problem when the text fits in container width. In that case I want the text just align on center by {textAlign: 'center'}. However this.setState({ animating: true }); is called even before this.calculateMetrics(); thus the static text with center aligned opacity is set to 0 and show ScrollView instead.

My proposal is to return promise from calculateMetrics, and instead of setTimeout we can chain then() to control what happens after.

this.setTimeout(() => {
        this.calculateMetrics();

        if (!this.contentFits) {
          Animated.timing(this.animatedValue, {
            toValue: -this.distance,
            duration: duration,
            easing: easing,
            useNativeDriver,
          }).start(({ finished }) => {
            if (finished) {
              if (loop) {
                this.resetAnimation();
              } else {
                this.stop();
                onMarqueeComplete();
              }
            }
          });
        }
      }, 100);

I tried implementing this but not yet success, any help would be grateful.

Easing InOut

It would appear that the easing options that go in reverse (inOut or back) result in an exception.

Number of times loop

Hii
How can i do the number of times the text will loop and then stop? after a certain number of times loop want to stop loop

infinity loop

Hi

How I can use the text like the html marquee infinity loop? actually the text restart from de begin, i want in the end of the text its start again like be concat with the same text

Does this really work for android?

We use this lib in our project, and everything works fine for iOS. However, on Android the text doesn't move at all. Well, it moves, but with a huge delay, even if I set marqueeDelay to 0. I think when there is a big number of marquee texts rendered, they start to behave this weird way.

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.