user interface - Why color of the Border doesn't change? -
i have textinput , should border around it, when i'm trying define border color, doesn't change, , stay grey, why that?
here code use render textinput border:
import react, {component} 'react'; import { stylesheet, view, text, image, textinput, appregistry } 'react-native'; class profile extends component { render() { return ( <view style={styles.profile}> <view style={[styles.loginrow, {marginbottom: 8}]}> <textinput style={styles.textinputvalue} ref={(ref) => this.password = ref} onfocus={() => this.password.focus()} onchangetext={(text) => this.setstate({password: text})} underlinecolorandroid="transparent" placeholdertextcolor="#ffffff" placeholder='password'/> </view> </view> ); } } const styles = stylesheet.create({ profile: { padding: 46, flex: 1, justifycontent: 'center', alignitems: 'center', backgroundcolor: '#f0aa14' }, loginrow: { height: 36, flexdirection: 'row', justifycontent: 'flex-start', alignitems: 'center', borderbottomwidth: 1, bordercolor: 'white', borderradius:20, elevation: 1, marginbottom: 25 }, textinputvalue: { flex: 1, alignself: 'center' } }); appregistry.registercomponent('test', () => profile);
i expect color of border should white, it's grey, how fix it?
this have:
can please try below style
loginrow: { height: 36, flexdirection: 'row', justifycontent: 'flex-start', alignitems: 'center', bordercolor: 'white', borderwidth: 1, borderradius: 20, elevation: 1, marginbottom: 25 }, textinputvalue: { flex: 1, marginhorizontal: 20, alignself: 'center' }
what did is, instead of borderbottomwidth: 1,
loginrow class, have changed borderwidth: 1,
, added marginhorizontal: 20,
on textinputvalue class.
please check
Comments
Post a Comment