-
Notifications
You must be signed in to change notification settings - Fork 109
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
Values lower than 50% not displayed correctly #18
Comments
can u tell me your version? |
|
@zash80 I have the same problem as you , how did you solve the issue? |
@JackPu 我貌似也碰到了同样的问题 |
OK我修复后通知你们更新。 # |
@huangxiaohao : I tried to fix it, but did not get it managed - also being busy on other stuff... |
@zash80 OK, It does not matter ,the author was already know this issue, we waited for him to fix this issue. |
@JackPu using your library and would love for this to be fixed as well! |
@AdityaAgg I am trying to fixed it soon. Last week i don't have enough time to debug this issue. But this week I'll have some free time. 💐 |
我也遇到了这个问题,希望及时修复啊- - |
same here , hope fixed soon |
请问 这个问题目前有没有被修复呢? |
@huangxiaohao @Yincongxiao @AdityaAgg 请提供下你的测试设备机型,我试过了Nexus 模拟器和 自己的华为手机的没有出现过这个bug,希望你们能留言下你们测试的机型? 😝 |
iOS模拟器上有问题 |
iOS上模拟器什么问题? @nouh 可以帖下图么? |
iOS模拟器和iPhone真机均有问题。具体的图片我在上面的提问上面有截图,你可以看看。 |
iOS 我一直都是测试的这个,android相对测试较少,你们发下 你们的 RN 版本? |
我目前用的是RN 0.43 |
https://facebook.github.io/react-native/docs/view.html#collapsable
render() {
const {disabled,disabledText,radius,bgColor,color,percent,innerColor="#fef7ea"}=this.props
const {leftTransformerDegree,rightTransformerDegree,borderWidth,textStyle}=this.state
if (disabled) {
return (
<View style={[styles.circle,{
width:radius*2,
height: radius*2,
borderRadius:radius
}]}>
<Text style={styles.text}>{disabledText}</Text>
</View>
);
}
return (
<View style={[styles.circle,{
width:radius*2,
height: radius*2,
borderRadius:radius,
backgroundColor: bgColor
}]}>
<View collapsable={false} style={[styles.leftWrap,{
width: radius,
height: radius * 2,
left:0,
}]}>
<View style={[styles.loader,{
left: radius,
width:radius,
height: radius*2,
borderTopLeftRadius:0,
borderBottomLeftRadius:0,
backgroundColor:color,
transform:[{translateX:-radius/2},{rotate:leftTransformerDegree},{translateX:radius/2}],
}]}></View>
</View>
<View collapsable={false} style={[styles.leftWrap,{
left:radius,
width: radius,
height: radius * 2,
}]}>
<View style={[styles.loader,{
left:-radius,
width:radius,
height: radius*2,
borderTopRightRadius:0,
borderBottomRightRadius:0,
backgroundColor: color,
transform:[{translateX:radius/2},{rotate:rightTransformerDegree},{translateX:-radius/2}],
}]}></View>
</View>
<View style={[styles.innerCircle,{
width:(radius - borderWidth)*2,
height:(radius - borderWidth)*2,
borderRadius:radius - borderWidth,
backgroundColor: innerColor,
}]}>
{this.props.children ? this.props.children :
<Text style={[styles.text, textStyle]}>{percent}%</Text>}
</View>
</View>
);
} |
iOS模拟器和iPhone真机 确实有这个问题 |
Hey everyone,
Hope it helps Kevin |
Android Studio 上的Nexus模拟器都不行 |
好呢,我测试下。 @SeanLine |
@SeanLine I have published a new version and fix the bug through the code by @checkitoutteam. I have tested it on both ios and android devices. |
@JackPu, the fix looks good - thanks! also thanks @checkitoutteam for providing the solution... |
@JackPu ios 模拟器上,低于50%确实不展示进度条,貌似就是因为那个原因 |
i have solved the issue,you need change these codes: #line 11 #line 96 if (Platform.OS == 'ios') { leftTransformerDegree = '0deg'; rightTransformerDegree = percent * 3.6 + 'deg'; }else{ leftTransformerDegree = '0deg'; rightTransformerDegree = -(50-percent) * 3.6 + 'deg'; } #line 157 backgroundColor: Platform.OS == 'ios' ? this.props.color : this.props.percent < 50 ? this.props.bgcolor : this.props.color, line number maybe is wrong,just search the code :) |
See attached screenshots - values below 50% not showing up correctly.
The text was updated successfully, but these errors were encountered: