react-native-ratings icon indicating copy to clipboard operation
react-native-ratings copied to clipboard

ratingBackgroundColor appears to the right of the star component

Open yangfreezy opened this issue 4 years ago • 10 comments

See screenshot below. I think there may be an issue where the width of whatever view ratingBackgroundColor is inside does not entirely align with the view that contains the tintColor, resulting in a slight sliver of the ratingBackgroundColor div appearing to the right of the star component. <Rating type="custom" ratingColor={colors.orange} ratingBackgroundColor={colors.progressBarBackground} ratingCount={5} tintColor={backgroundColor || 'white'} imageSize={20} startingValue={rating || 0} readonly fractions={1} onFinishRating={onPress} />

Simulator Screen Shot - iPhone 8 - 2020-07-07 at 10 54 23

yangfreezy avatar Jul 03 '20 00:07 yangfreezy

@yangfreezy This package is good, I use it in multiple project. But two small problems in this package irritates me:

  1. line in background
  2. In Android, when this is used inside <TouchableOpacity />, over tapping for couple of ms, it shows grey background behind star images.

I was facing the exact problem in this package. So i just created small package(readonly ratings) https://github.com/ui-ninja/react-native-rating-element. (Uses Ionicons for stars)

ui-ninja avatar Jul 04 '20 19:07 ui-ninja

Here's a similar issue in android, except this time the rating color leaks, instead of the background color.

Screenshot_1594144112

yangfreezy avatar Jul 07 '20 17:07 yangfreezy

Strange.. Can you provide code snippet for this issue? This will help in reproducing it at my end using react-native-rating-element

ui-ninja avatar Jul 07 '20 18:07 ui-ninja

@ui-ninja sorry - i think there was a miscommunication. the screenshot and issue above is with the react-native-rating package. I just switched over to your package, react-native-rating-element and it works perfectly! thanks so much for actively promoting your package and commenting on it :D

yangfreezy avatar Jul 07 '20 18:07 yangfreezy

Glad it could help 👍

ui-ninja avatar Jul 07 '20 18:07 ui-ninja

@ui-ninja Your package worked like a charm .. Thanks for posting it!

anshulasethi avatar Jul 10 '20 18:07 anshulasethi

I got same issue :) Not fixed yet?

anastely avatar Aug 15 '20 14:08 anastely

Having the same issue on android

mit4dev avatar Sep 03 '20 21:09 mit4dev

I am also experiencing this on Android API 28 with the following code:

<Rating
          type='star'
          ratingColor={Colors.starAmber}
          imageSize={20}
          startingValue={2})}
          readonly
        />

image (6)

micnguyen avatar Jan 20 '21 04:01 micnguyen

I managed to get around this bug by doing the following:

  1. Modify SwipeRating.js in the node packages folder Screen Shot 2021-05-19 at 12 30 13 AM

  2. Adding left:1 to the starsWrapper style Screen Shot 2021-05-19 at 12 30 33 AM

Seems to work fine on both android and iOS.

dejolt avatar May 18 '21 22:05 dejolt