我可以增强按钮的触摸灵敏度吗?

发布于 2024-11-27 23:33:52 字数 139 浏览 5 评论 0原文

我正在开发一个应用程序,这里有两个按钮,用于导航应用程序中的故事,例如下一个和上一个按钮。它们没有被正确点击,我的意思是我必须点击它们两次或三次才能使它们在设备上工作。无论如何,我可以提高按钮的灵敏度,以便只需轻轻一按即可工作。如有任何建议和帮助,我们将不胜感激。

I am working on an app, here i have two button, which navigate through the stories in my app, say next and previous buttons. They are not tapped properly, i mean i have to tap them twice or thrice to make them work on device. Is there anyway that i can increase the sensitivity of the buttons so that the work on just one tap. Any Suggestions and help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

°如果伤别离去 2024-12-04 23:33:52

使用 RelativeLayout 和 10-15 dp 的 Paddings/Margins 来包围每个 Button 并将触摸监听器注册到 RelativeLayout而不是 Button

Use RelativeLayouts, with 10-15 dp of Paddings/Margins to enclose each of the Buttons and register the touch listener to the RelativeLayouts instead of the Buttons.

原野 2024-12-04 23:33:52

这与设备上其他地方的按钮行为有什么不同吗?如果是这样,那么您在应用程序中做了一些奇怪的事情,导致了一些问题。如果不是,那么这只是您的设备工作方式的问题,您几乎不需要做任何事情就可以使应用程序中的按钮表现不同。

您可以做的一件事是将开发 (DevTools) 应用程序放在您的设备上,然后打开指针位置以在屏幕上查看正在生成的实际指针事件。

Is this different from the behavior of buttons elsewhere on your device? If so, you have done something strange in your app that has broken things. If not, then this is just an issue with how your device works and there is little you are likely to be to do to make the buttons in your app behave differently.

One thing you can do is put the Development (DevTools) app on your device and turn on Pointer Location to see on your screen the actual pointer events being generated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文