Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextInput's content is not center vertical

Tags:

react-native

I found the TextInput's content is not centered vertical (in some android devices like HUAWEI), when the TextInput's parent style is {flexDirection: 'row'}, It looks like the baseline is center, and text is more upper.

enter image description here

like image 688
mrwrong1988 Avatar asked Dec 15 '22 06:12

mrwrong1988


1 Answers

I finally found the reason,this is because TextInput has default padding, My solution is add paddingTop: 0,paddingBottom: 0,to the TextInput style.

like image 165
mrwrong1988 Avatar answered Mar 16 '23 04:03

mrwrong1988