我正在尝试使用 React Native 构建一个简单的计算器。
I created a button component with borderWidth 0.5 and used this button component to form keypad. But border is not uniform. Border appears thick on few cells compared to others
![enter image description here](https://i.stack.imgur.com/oFpJA.png)
代码位于https://github.com/akiran/exponent-calculator/blob/master/components/Buttons.js https://github.com/akiran/exponent-calculator/blob/master/components/Buttons.js
https://github.com/akiran/exponent-calculator/blob/master/components/KeyPad.js https://github.com/akiran/exponent-calculator/blob/master/components/KeyPad.js
我用你的代码构建了一个示例,无法完全弄清楚为什么会发生这种情况。然而,这是一个可重现的问题。可能与重叠边界有关?
作为解决方法,您可以使用borderLeftWidth: 1
and borderTopWidth: 1
并将其他边框保留为 0 宽度,这会产生下面可见的结果。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)