<KeyboardAwareScrollView
keyboardShouldPersistTaps={"handled"}
bounces={false}
scrollEventThrottle={8}
automaticallyAdjustContentInsets={false}
>
<View
style={{
marginLeft: scale(24),
alignItems: "center"
}}
>
{this.state.***=== 0 && this.*****()}
{this.state.*** === 1 && this.*****()}
</View>
</KeyboardAwareScrollView>
我使用了 KeyboardAwareScrollView ,以便点击 next 时会自动调整高度。