TextInput Вертикальная Aligment - PullRequest
0 голосов
/ 27 апреля 2018

Кто-нибудь знает, как исправить вертикальное выравнивание для TextInput с пользовательским шрифтом (Content и Placeholder)? Я попробовал все это:

  • justifyContent: "center",
  • alignItems: ‘center’,
  • textAlign: "center",
  • textAlignVertical: «центр»,

Ничего не работает! Есть предложения?

enter image description here

           <TextInput
            ref={ref => this.emailField = ref}
            placeholder="E-Mail"
            style={styles.loginInput}
            placeholderStyle={styles.loginInput}
            editable={true}
            maxLength={40}
            autoCorrect={false}
            selectionColor="#9D9D9D"
            placeholderTextColor="#9D9D9D"
            autoCapitalize="none"
            keyboardType="email-address"
            returnKeyType="next"
            keyboardAppearance="dark"
            textAlign="center"
            underlineColorAndroid="transparent"
            onSubmitEditing={() => this.passwordField.focus()}
            value={this.state.email}
            onChangeText={(text) => this.setState({ email: text })}
          />

  loginInput: {
    width: '70%',
    height: 40,
    marginBottom: 8,
    backgroundColor: '#dbdbdb',
    fontFamily: 'Neuzeit Grotesk Regular',
    fontSize: 18,
    justifyContent: 'center',
    alignItems: 'center',
    textAlign: 'center',
    textAlignVertical: 'center',
  },
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...