I am new to React Native. Text in text input looks different on android and iOS. How do I vertically align text in text input?
My codes:
import React from "react"
import { TextInput } from "react-native"
export default function Signup() {
return (
<TextInput
style={{ backgroundColor: 'red', height: 30, textAlignVertical: 'top' }}
/>
)
}
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>
Pictures:
CodePudding user response:
textAlignVertical is Android only.
Looks you problem may be solved with paddingBottom: <number>
, or try setting lineHeight
equal to fontSize
.