我正在使用带有加号按钮的底部选项卡但是加号按钮在只有 android 中的本机反应中的一半区域不可点击? [英] I am using bottom-tabs with a plus button But Plus button is not clickable in half of the area in react native in android Only?

查看:54
本文介绍了我正在使用带有加号按钮的底部选项卡但是加号按钮在只有 android 中的本机反应中的一半区域不可点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 React Native 中使用 @react-navigation/bottom-tabs.而且我需要该区域上方的加号按钮,所以我能够实现它,但是在 Android 中加号图标的半个区域在 android 中是不可点击的.但在 IOS 中它运行良好,任何人都有答案.

I am using @react-navigation/bottom-tabs in the react native. And i need Plus button above the area, So i am able to achieve it, but in the Android Above half area of the Plus icon is not clickable in android.But in IOS it is working fine anybody have an answer about it.

推荐答案

请像这样在按钮上使用 hitSlop 属性来增加点击区域:

Kindly use hitSlop property on your button like this to increase the tapping area:

hitSlop={{top: 20, bottom: 20, left: 50, right: 50}}

这篇关于我正在使用带有加号按钮的底部选项卡但是加号按钮在只有 android 中的本机反应中的一半区域不可点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆