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

Android Stars Are Not Displaying Correctly

Open oporter1 opened this issue 6 years ago • 12 comments

I am working with "react-native-elements" {Rating} on iOs and android. It works great on iOs but on android the star images are coming in as a solid block. See below picture. Any idea why this would be happening? Is it happening to anyone else?

import {Rating} from "react-native-elements";
import CustomCallout from "./customCallout";
                        <CustomCallout>
                          <Text style={{fontFamily: Font.Bold}}>
                            {marker.placeName}
                          </Text>
                          <Rating
                            imageSize={15}
                            readonly
                            startingValue={marker.rating}
                            style={{marginLeft: -35}}
                          />
                          <Text style={{fontFamily: Font.Regular}}>
                            {marker.placeType}
                          </Text>
                        </CustomCallout>
class CustomCallout extends React.Component {
  render() {
    return (
      <View style={[styles.container, this.props.style]}>
        <View style={styles.bubble}>
          <View style={styles.amount}>{this.props.children}</View>
        </View>
        <View style={styles.arrowBorder} />
        <View style={styles.arrow} />
      </View>
    );
  }
}

image

oporter1 avatar Oct 08 '20 14:10 oporter1

I am using the same "react-native-elements" library.it's working fine for ios but in android, stars disappear on selecting, please have look.

IMG_20201021_161828 <AirbnbRating defaultRating={defaultRating} type='custom' ratingImage={Assets.userType.ratingbg} ratingColor='#FFCB27' ratingBackgroundColor='#c8c7c8' count={count} showRating={false} imageSize={30} starStyle={{ height: 30, width: 32 }} onFinishRating={onratingCompleted} /> am also try with custom type to set a watermark image.

GurjantSinghAffle avatar Oct 21 '20 10:10 GurjantSinghAffle

same here

Rooib avatar Oct 21 '20 11:10 Rooib

same here

Hi Rooib, you can use the new Library. Link: https://www.npmjs.com/package/react-native-rating maybe it helpful for you

GurjantSinghAffle avatar Oct 21 '20 13:10 GurjantSinghAffle

I was able to resolve it by making Changes in file react-native-ratings/src/components/Star.js From tintColor: fill && selectedColor ? selectedColor : undefined, to tintColor: fill && selectedColor ? selectedColor :"#e5e5e5",

vinaygoyal20 avatar Oct 22 '20 19:10 vinaygoyal20

I was able to resolve it by making Changes in file react-native-ratings/src/components/Star.js From tintColor: fill && selectedColor ? selectedColor : undefined, to tintColor: fill && selectedColor ? selectedColor :"#e5e5e5",

Thanks, helped me instantly!

OlMrGreen avatar Nov 14 '20 11:11 OlMrGreen

i have the same problem, can it be fixed perement?

jeffreybenabou avatar Dec 27 '20 12:12 jeffreybenabou

I am too having the same issue, Isnt it fixed yet in latest versions?

shubhamkes avatar Jan 05 '21 12:01 shubhamkes

This has been fixed. Please try with the latest version.

sshivananda avatar Mar 23 '21 07:03 sshivananda

I am also having this issue.It's not working!!

parmarravi avatar Sep 13 '21 10:09 parmarravi

Having the same issue with the latest version

Devoagency avatar Jan 13 '22 04:01 Devoagency

Same issue on iOS

thenderson55 avatar May 19 '22 03:05 thenderson55

just remove halfStarEnabled={true} and it will not break in android

syedamirali14 avatar Jun 18 '22 11:06 syedamirali14