我正在与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
元素本身有关,但无法通过更改边框或阴影来消除它.
想知道以前是否有人经历过类似的事情,提前谢谢!