React-native: Multiline TextInput is not centering text or placeholder vertically

Created on 23 Apr 2017  路  5Comments  路  Source: facebook/react-native

Description

Hi, I'm trying to center the text into a multiline text input but seems like its not possible.

Reproduction Steps and Sample Code

<TextInput style={styles.inputStyle} placeholder="Type Answer" multiline />

inputStyle: { flex: 1, justifyContent: 'center', alignItems: 'center' textAlign: 'center', fontSize: 16 },

Additional Information

  • React Native version: 0.43
  • Platform: [Both]
  • Development Operating System: [MacOs]
  • Dev tools: [Android SDK 23]
Locked

Most helpful comment

Having a similar issue.

All 5 comments

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

Having a similar issue.

Setting textAlignVertical: 'center' style on the input helped in my case.

any solution?
I have this problem in android 5.0.1

Same here textAlignVertical: 'center' doesn't help.

Was this page helpful?
0 / 5 - 0 ratings