如何在 React Native 中制作这样的密码类型的 TextInput?我希望输入像默认类型一样变成黑色圆圈,但我希望它根据每个输入之间的填充进行自定义。
1 回答
3
您可以使用您拥有的模块而无需制作它们。
我使用它的方式
import PinView from "react-native-pin-view";
...
<PinView
onComplete={this.onFinishCheckingCode.bind(this)}
pinLength={4}
inputBgColor="#888888"
inputActiveBgColor="#ffd90d"
buttonBgColor="#ffffff"
buttonTextColor="black"
keyboardViewStyle={{
borderColor: "#dfdfdf",
borderWidth: 1,
width: windowHeight / 11,
height: windowHeight / 11
}}
inputViewStyle={{ width: 18, height: 18, marginRight: 20 }}
/>
于 2019-08-14T08:59:12.647 回答