好用的文章万里无一,没用的文章千片一律.........

1.react-native:textinput,主要讲一个事件,onChangeText。目的是在onChangeText里面直接写函数,而不是简单地setState。

我在用onChange时候小伙伴们会发现,这个半吊子的方法总是拿不到输入后的最后一位。

而大多数小伙伴在使用onChangeText,一般会在onChangeText里面直接setState,但是不满足我的需求,于是我在onChangeText里面写了个函数。

<TextInput maxLength={20} underlineColorAndroid='transparent' secureTextEntry={true} placeholder="请输入新密码" placeholderTextColor="#999" style={styles.marginl} onChangeText={(usernewpassword)=>{this.yanzheng(usernewpassword)}} onFocus={this.firstfontsize.bind(this)} onBlur={this.blurfirstfontsize.bind(this)}></TextInput>


2. react-native:textinput,改写默认安卓的底线border:underlineColorAndroid='transparent'。

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐