I'm struggling on a dumb issue here with styling a TextInput. For some reason, I need to have a border line on a View that contains a TextInput.
Therefore, I don't want the TextInput to display its border line. On iOS, everything's fine without doing anything but on Android, it still displays a black underline.
I've tried to set borderWidth to 0, to set the borderColor to transparent but it doesn't change anything.
What should I do?
Ok, I found how to fix this. There is a special props for Android which is underlineColorAndroid . It's set by default so if you want your border line to be invisible, simply do as follow:
<TextInput
...
underlineColorAndroid={'rgba(0,0,0,0)'}
/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.