triniwiz / nativescript-star-ratings

NativeScript star ratings UI component plugin.
Apache License 2.0
22 stars 8 forks source link

emptyBorderColor, emptyColor and filledBorderColor properties don't change. #13

Open murat199 opened 6 years ago

murat199 commented 6 years ago

I changed emptyBorderColor, emptyColor and filledBorderColor property color's, but anything didn't changed. Border colors looks white. I am using genymotion - Google Nexus 5X - 6.0.0 device. My code is;

<ui:StarRating horizontalAlignment="center" verticalAlignment="center" id="rating" emptyBorderColor="red" emptyColor="red" filledBorderColor="black" filledColor="red" value="3" max="5" isindicator="false"/>

please, can you help me? Thank you.

max-pro commented 5 years ago

Same issue I was facing on Nokia 6.0

KirilOkun commented 4 years ago

same problem. emptyColor does not work on Android. after digging some more it turns out that Android code hardcodes emptyColor to white and ignores the css property set on the component. a quick and dirty fix for this is to change line 40 in star-ratings.android.js file to change the hardcoded value of 'white' to whatever emptyColor you want (i used '#ECECEC').

to the author, please remove the hardcoded value.

Devendra0110 commented 4 years ago

same problem. emptyColor does not work on Android. after digging some more it turns out that Android code hardcodes emptyColor to white and ignores the css property set on the component. a quick and dirty fix for this is to change line 40 in star-ratings.android.js file to change the hardcoded value of 'white' to whatever emptyColor you want (i used '#ECECEC').

to the author, please remove the hardcoded value.

Well I tried a different thing, I replaced the 'white' from color variable and now I just pass the hex value in the component and it's working. <StarRating horizontalAlignment="center" verticalAlignment="center" row="5" col="0" colSpan="2" emptyBorderColor="white" emptyColor="#D355D3" filledBorderColor="black" filledColor="red" value="2" max="5"></StarRating>