Skip to content

[Android] underlineColorAndroid somehow applies globally to all TextInput components #6332

@mihir0x69

Description

@mihir0x69

I have a component in search.js. Something like this-

<TextInput 
    placeholder={'Search keyword'}
    placeholderTextColor={'#cccccc'}
    style={styles.input}
    autoCapitalize={'none'}
    autoFocus={true}
    underlineColorAndroid={'#cccccc'}
>
</TextInput>

The style for given TextInput is this-

input: {
    padding: 5,
    height: 45,
    fontSize: 16,
    color: '#111111',
    marginBottom: 20,
    borderWidth: 1,
  },

screenshot from 2016-03-07 10 57 13

I have another TextInput placed in my sign-in page.

<TextInput 
    style={styles.input} 
    value={this.state.username} 
    onChangeText={(text) => this.setState({username: text, error: ''})}
    autoCapitalize={'none'} 
    autoCorrect={false} 
    returnKeyType='next' 
    keyboardType={'email-address'}
>
</TextInput>

Style-


input: {
        padding: 4,
        height: 45,
        fontSize: 22,
        color: '#ffffff',
        marginBottom: 20,
        borderWidth: 1,
        textAlign: 'center'
    },

screenshot from 2016-03-07 11 01 59

Why is underlineColorAndroid={'#cccccc'} from first TextInput is being applied to the second TextInput? Am I doing something wrong? Or is this a legitimate issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help Wanted :octocat:Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions