We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
百分比布局下,percentOfRow设置小数比例无效! 例如: case 0: return 0.39; case 1: return 0.61;
宽度不会按如上比例分配
The text was updated successfully, but these errors were encountered:
看了源代码,实际浮点数判断相等有问题,但是作者保留了0.1的误差值,作为一行的判断标准。
实际可以更精确点:
判断是否等于1: fabs(num - 1.0) < FLT_EPSILON
Sorry, something went wrong.
奇怪,我测试了原来的代码和你改的代码。两者出来的效果是一致的
。。我这边改了,布局就正常了,这里主要还是判断浮点数相等问题,会不会是不同系统版本有点区别。。。
No branches or pull requests
百分比布局下,percentOfRow设置小数比例无效!
例如:
case 0:
return 0.39;
case 1:
return 0.61;
宽度不会按如上比例分配
The text was updated successfully, but these errors were encountered: