我对活动指标有疑问。
在我的注册页面中,当单击注册按钮时,我放置了一个加载器。现在有一个问题,如果有人在要注册的字段中插入数据并且其中一些数据是错误的,但是单击注册按钮,则加载程序中的按钮会更改但无法再单击。唯一的解决方案是回到家中,然后在页面中再次进行注册。我能怎么做??
所以问题是当按钮被点击的时候,因为如果某些字段是错误的,即使数据改变了也无法注册,因为键已经变成了一个加载器。
<View style={style.inputContainer}>
<TextInput
style={style.inputs}
placeholder="Email"
placeholderTextColor="#56cbbe"
keyboardType="email-address"
underlineColorAndroid="grey"
onChangeText={Email => this.setState({ Email })}
/>
</View>
<View style={style.inputContainer}>
<TextInput
style={[style.inputs]}
placeholder="Password"
placeholderTextColor="#56cbbe"
secureTextEntry={true}
underlineColorAndroid="grey"
onChangeText={Password => this.setState({ Password })}
/>
</View>
<View style={style.inputContainer}>
<TextInput
style={style.inputs}
placeholder="Verifica Password"
placeholderTextColor="#56cbbe"
secureTextEntry={true}
underlineColorAndroid="grey"
onChangeText={PasswordRepeat => this.setState({ PasswordRepeat })}
/>
</View>
<View style={style.footer}>
{(!this.state.isLoading) ? <TouchableOpacity
style={[style.button, style.buttonOK]}
onPress={() => this.showLoader()}
>
<Text style={[style.buttonTesto]}>Signup</Text>
</TouchableOpacity> : <ActivityIndicator animating={this.state.isLoading} size="large" color="#56cbbe" />} // IT'S here!
</View>
</KeyboardAwareScrollView>
非常感谢 :)