[英]react native - android - Picker has underline
Have a problem with Picker
style - it has underline like TextInput
on Android, but underlineColorAndroid = 'transparent'
or any other color isn't working. Picker
样式有问题-它的下划线像Android上的TextInput
一样,但是underlineColorAndroid = 'transparent'
或其他任何颜色都不起作用。
I'm using Picker
from NativeBase, and this Picker
replaces ReactNative Picker
. 我使用的Picker
从NativeBase,而这个Picker
代替ReactNative Picker
。 So here is my code. 这是我的代码。 I've tryed wrapped Item
with Input
(NativeBase) or TextInput
with underlineColorAndroid
property, because only TextInput can have this prop, but has no luck. 我已经尝试用Input
(NativeBase)或带有underlineColorAndroid
属性的TextInput
包裹Item
,因为只有TextInput可以具有此道具,但是没有运气。 Changing styles of the components with bottomBorderColor doesn't give a result too. 使用bottomBorderColor更改组件的样式也不会产生结果。 Can anyone help me please? 谁能帮我吗?
<View>
<Form>
<Item inlineLabel>
<Label>Region</Label>
<Picker
style={{ alignItems: 'flex-end', width: 200 }}
placeholder='...'
>
<Picker.Item label="..."/> //this first Item rendered as underlined
</Picker>
</Item>
</Form>
</View>
Add style={{borderColor:"transparent"}}
to the <Item>
tag. 将style={{borderColor:"transparent"}}
到<Item>
标签。
<View>
<Form>
<Item inlineLabel style={{borderColor: "transparent"}}>
<Label>Region</Label>
<Picker
style={{ alignItems: 'flex-end', width: 200 }}
placeholder='...'
>
<Picker.Item label="..."/> //this first Item rendered as underlined
</Picker>
</Item>
</Form>
</View>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.