Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratingBackgroundColor appears to the right of the star component #109

Open
yangfreezy opened this issue Jul 3, 2020 · 10 comments
Open

ratingBackgroundColor appears to the right of the star component #109

yangfreezy opened this issue Jul 3, 2020 · 10 comments

Comments

@yangfreezy
Copy link

yangfreezy commented Jul 3, 2020

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 yangfreezy changed the title ratingBackgroundColor shows up in a small div to the right occasionally ratingBackgroundColor appears to the right of the star component Jul 3, 2020
@ui-ninja
Copy link

ui-ninja commented Jul 4, 2020

@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 , 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)

@yangfreezy
Copy link
Author

yangfreezy commented Jul 7, 2020

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

Screenshot_1594144112

@ui-ninja
Copy link

ui-ninja commented Jul 7, 2020

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

@yangfreezy
Copy link
Author

yangfreezy commented Jul 7, 2020

@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

@ui-ninja
Copy link

ui-ninja commented Jul 7, 2020

Glad it could help 👍

@anshulasethi
Copy link

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

@anastely
Copy link

I got same issue :)
Not fixed yet?

@mit4dev
Copy link

mit4dev commented Sep 3, 2020

Having the same issue on android

@micnguyen
Copy link

micnguyen commented Jan 20, 2021

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)

@dejolt
Copy link

dejolt commented May 18, 2021

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

  1. 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.

lcoalves pushed a commit to lcoalves/react-native-ratings that referenced this issue Jun 10, 2021
yongching pushed a commit to lava-x/react-native-ratings that referenced this issue Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants