[英]How can I change distance between icons of the tabbar from React Navigation 5?
So, here is what I currently have:所以,这是我目前拥有的:
And I need distance between icons to be equal.我需要图标之间的距离相等。 That's what I'm unable to do using tabStyle prop like this:
这就是我无法像这样使用 tabStyle 道具做的事情:
tabStyle: {
width: whatever
}
cause distance is not equal.因为距离不相等。 How can I do so in React Navigation 5?
我如何在 React Navigation 5 中这样做?
I assume you want the labels to be as wide as the content instead of stretching to available width.我假设您希望标签与内容一样宽,而不是拉伸到可用宽度。 In that case, you need to set
width
to auto
:在这种情况下,您需要将
width
设置为auto
:
tabStyle: {
width: 'auto'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.