这个错误仅在构建中出现,而在Expo Go中正常工作。注意:第一张图片是来自Expo Go(预期)的,第二张图片是来自构建(问题)。当模态窗口打开并提示键盘时,键盘只出现在模态窗口上方。模态窗口应该在键盘滑入时向上移动。 我曾使用过react-native的KeyboardAvoidingView,尝试通过将Android设置为undefined,IOS设置为padding(我正在测试Android)来更改其行为。 在app.json中,我有:"softwareKeyboardLayoutMode":"resize" 但是这个错误仍然存在,所以我尝试了react-native-keyboard-controller,仍然存在问题。 示例代码: <Modal visible transparent animationType="slide"> <KeyboardAvoidingView className="flex-1" behavior={Platform.OS === "ios" ? "padding" : "height"} > <View className="flex-1 bg-black/40 justify-center px-6"> <View className="rounded-3xl bg-background p-6 shadow-xl"> <View className="mb-6 flex-row items-center justify-between">
键盘重叠时模态窗口打开
评论 (0)