组件 :import {TextInput} from "react-native";
点击输入框弹窗软键盘,如果TextInput在底部会被覆盖住,请问怎么设置不覆盖
import React from "react";
import { View, TextInput, StyleSheet } from "react-native";
export default function TextInputExample() {
return (
<View>
<TextInput
style={styles.intextInputStyle}
value="777"
onChangeText={(text) => {
}}
underlineColorAndroid="transparent"
autoFocus={true}
keyboardType="numeric"
/>
</View>
);
}
const styles = StyleSheet.create({
inputItem: {
lineHeight: 20,
width: 80,
textAlign: "center",
height: 40,
},
intextInputStyle: {
marginTop: 570,
height: 40,
fontSize: 25,
marginHorizontal:50,
color: '#3C3834',
backgroundColor: "yellow",
},
});
修改了您的demo,您看一下能否满足您的需求: