react-native-elements,帮助中心在 FormInput 中输入文本
react-native-elements, help center input text within FormInput
我正在使用 react-native-elements 中的表单,并希望将输入文本居中。我试过了,alignSelf: 'center'
和 flex: 1, justifyContent: 'center', alignItems: 'center'
都没有成功。所有文本继续保持左对齐。
仅供参考,我正在对 inputStyle
prop 进行调整。
<FormInput
...
inputStyle={styles.formInputText}
/>
试试 textAlign
属性
<FormInput
...
inputStyle={styles.formInputText}
textAlign={'center'}
/>
此外,您可能想要升级您的软件包,因为它看起来 FormInput
已被弃用 according to the docs...
<FormInput />
is only available in v0.19.1 and below. <Input />
is only
available in v1.0.0-beta1
and higher.
我正在使用 react-native-elements 中的表单,并希望将输入文本居中。我试过了,alignSelf: 'center'
和 flex: 1, justifyContent: 'center', alignItems: 'center'
都没有成功。所有文本继续保持左对齐。
仅供参考,我正在对 inputStyle
prop 进行调整。
<FormInput
...
inputStyle={styles.formInputText}
/>
试试 textAlign
属性
<FormInput
...
inputStyle={styles.formInputText}
textAlign={'center'}
/>
此外,您可能想要升级您的软件包,因为它看起来 FormInput
已被弃用 according to the docs...
<FormInput />
is only available in v0.19.1 and below.<Input />
is only available inv1.0.0-beta1
and higher.