在 React Native 中绘制水平线 [英] Draw horizontal rule in React Native
本文介绍了在 React Native 中绘制水平线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试过 react-native-hr 包 - 不适用于无论是在 Android 上还是在 iOS 上.
I've tried react-native-hr package - doesn't work for me nor on Android nor on iOS.
下面的代码也不适合,因为它在最后呈现三个点
Following code is also not suitable because it renders three dots at the end
<Text numberOfLines={1}}>
______________________________________________________________
</Text>
推荐答案
您可以简单地使用带有底部边框的空视图.
You could simply use an empty View with a bottom border.
<View
style={{
borderBottomColor: 'black',
borderBottomWidth: 1,
}}
/>
这篇关于在 React Native 中绘制水平线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文