简体   繁体   English

反应本机-android-Picker下划线

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM