deanhet / react-native-text-ticker

React Native Text Ticker/Marquee Component
MIT License
453 stars 75 forks source link

Text truncated on Android #27

Closed rezaarifian closed 5 years ago

rezaarifian commented 5 years ago

Text not show full character on Android.

I remove this numberOfLines={1} on <Animated.Text> original code :

<Animated.Text
            ref={c => (this.textRef = c)}
            {... props}
            numberOfLines={1}
            style={[style, { transform: [{ translateX: this.animatedValue }], width: null }]}
          >
            {this.props.children}
          </Animated.Text>
          {!contentFits && !isScrolling
            ? <View style={{ paddingLeft: repeatSpacer }}>
              <Animated.Text
                {... props}
                numberOfLines={1}
                style={[style, { transform: [{ translateX: this.animatedValue }], width: null }]}
              >
                {this.props.children}
              </Animated.Text>

change to :

<Animated.Text
            ref={c => (this.textRef = c)}
            {... props}
            style={[style, { transform: [{ translateX: this.animatedValue }], width: null }]}
          >
            {this.props.children}
          </Animated.Text>
          {!contentFits && !isScrolling
            ? <View style={{ paddingLeft: repeatSpacer }}>
              <Animated.Text
                {... props}
                style={[style, { transform: [{ translateX: this.animatedValue }], width: null }]}
              >
                {this.props.children}
              </Animated.Text>

Please fix this issue on next release

SaeedZhiany commented 5 years ago

Have you tried submitting a pull request yourself?

deanhet commented 5 years ago

Can you provide the text that causes the issue you’re seeing? Would be happy to test and merge if you submit a pull request.