React Native 55.4:contextMenuHidden 不会在 Android 上隐藏菜单

编程入门 行业动态 更新时间:2024-10-12 16:30:02
本文介绍了React Native 55.4:contextMenuHidden 不会在 Android 上隐藏菜单 - 禁用 React-Native 文本输入选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用最近添加(在 v0.55.4 中)TextInput 的 prop 称为 contextMenuHidden.当我将此道具添加到 TextInput 组件时,它似乎禁用了 iOS 的复制和粘贴,但不适用于 Android.

I'm using a recently added (in v0.55.4) prop to TextInput called contextMenuHidden. When I add this prop to a TextInput component it seems to disable copy and paste for iOS but not for Android.

有没有其他人遇到过这种情况?是否还需要执行另一个步骤才能在 android 上禁用复制和粘贴?

Has anyone else experienced this? Is there another step that needs to happen to get this to disable copy and paste on android?

<TextInput style={...} onChangeText={...} value={...} contextMenuHidden={true} />

推荐答案

for ios

<TextInput contextMenuHidden={true}

安卓版

<View removeClippedSubviews={true}> <TextInput contextMenuHidden={true} /> </View>

更多推荐

React Native 55.4:contextMenuHidden 不会在 Android 上隐藏菜单

本文发布于:2023-10-11 14:27:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1481969.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:会在   菜单   Native   React   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!