gpt4 book ai didi

react-native - React Native 元素搜索栏边框线未清除

转载 作者:行者123 更新时间:2023-12-04 09:06:10 24 4
gpt4 key购买 nike

我正在与 React Native elements searchbar 一起工作并且正在努力使顶部和底部的这两条小线消失-我不知道它们是什么:

Weirdly formatted Searchbar image here

这是我的搜索栏代码:

    <SearchBar placeholder="Search contacts..." 
data={this.state.searchResultFriendsList}
ref={(ref) => this.searchBar = ref}
style= {styles.searchbar}
lightTheme round
containerStyle={styles.searchcontainer}
/>

这是我的两个风格片段:
searchcontainer: {
backgroundColor: 'white',
borderWidth: 0, //no effect
shadowColor: 'white', //no effect
},
searchbar: {
width: "100%",
backgroundColor: 'red', //no effect
borderWidth:0, //no effect
shadowColor: 'white', //no effect
},

如果我从 lightTheme 更改主题默认情况下,线条变成深灰色,所以我知道它与 SearchBar 有关。元素本身,但无法通过更改边框或阴影来摆脱它。

想知道有没有人遇到过这种情况,先谢过了!

最佳答案

使用 borderBottomColorborderTopColortransparentsearchcontainer

searchcontainer: {
backgroundColor: 'white',
borderWidth: 0, //no effect
shadowColor: 'white', //no effect
borderBottomColor: 'transparent',
borderTopColor: 'transparent'
}

希望这会有所帮助

关于react-native - React Native 元素搜索栏边框线未清除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49435315/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com