Change underlineColorAndroid on Focus for TextInput in react-native
<p>Similar to <a href="https://stackoverflow.com/questions/34087459/focus-style-for-textinput-in-react-native">Focus style for TextInput in react-native</a>, I am trying to change the property underlineColorAndroid for the textInput. </p>

<p>I am using React-Native 0.28.0</p>

<p>OnFocus, the attribute doesn't change. How do I change the underline to a different color onFocus? </p>

<p>My sample code is below: </p>

<pre><code>'use strict';

import React, { Component } from 'react';

import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TextInput,
  ScrollView
} from 'react-native';

class RNPlayground extends Component {
  constructor(props) {
    super(props);
    this.state = {
      hasFocus: false
    }
  }

  _onBlur() {
    this.setState({hasFocus: false});
    }

  _onFocus() {
    this.setState({hasFocus: true});
    }

  _getULColor(hasFocus) {
    console.error(hasFocus);
    return (hasFocus === true) ? 'pink' : 'violet';
  }

  render() {
    console.error("this.state=");
    console.error(this.state);
    console.error("this.state.hasFocus=");
    console.error(this.state.hasFocus);

    return (
      &lt;View style={styles.container}&gt;
        &lt;ScrollView&gt;
          &lt;TextInput
            placeholder="textInput"
            onBlur={ () =&gt; this._onBlur() }
            onFocus={ () =&gt; this._onFocus() }
            style={styles.instructions}
            underlineColorAndroid={this._getULColor(this.state.hasFocus)}/&gt;
                &lt;/ScrollView&gt;
        &lt;TextInput&gt;Some sample text&lt;/TextInput&gt;
      &lt;/View&gt;
    );
  }
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 28,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    fontSize: 19,
    marginBottom: 5,
  }

});

AppRegistry.registerComponent('RNPlayground', () =&gt; RNPlayground);
</code></pre>