简体   繁体   English

Android上的触摸灵敏度(Gluon / JavaFXPorts)

[英]Touch Sensitivity on Android (Gluon/JavaFXPorts)

The default Touch Sensitivity is 20px. 默认的触摸灵敏度为20px。 That prevents my app from being percise... 这会阻止我的应用程序精确化...

This issue has already been discussed for JavaFXPorts: https://bitbucket.org/javafxports/android/issues/50/missing-touchevents 已经针对JavaFXPorts讨论了此问题: https ://bitbucket.org/javafxports/android/issues/50/missing-touchevents
("Just" setting the sensitivity to 1px via javafx.platform.properties) (“仅”通过javafx.platform.properties将敏感度设置为1px)

But how do I fix it with Gluon? 但是我如何用Gluon修复它? Where do I have to put the javafx.platform.properties? 我必须在哪里放置javafx.platform.properties?

When I put it in the android assets folder and tell gradle about the assets folder still nothing happens... 当我将其放在android资产文件夹中并告诉gradle有关资产文件夹时,仍然没有任何反应...

Do I have to tell gradle more in order to work with Gluon or how can I fix it? 为了与Gluon合作,我是否必须告诉gradle更多信息,或者如何解决?

You can create the java.custom.properties file and place it at the root of your classpath, eg in the folder src/android/resources of your project. 您可以创建java.custom.properties文件并将其放置在类路径的根目录下,例如,在项目的src/android/resources文件夹中。

Now include in it this property: 现在在其中包含此属性:

monocle.input.touchRadius=1

You can override other system properties as well by including them with their new values. 您也可以通过将其他系统属性包含在它们的新值中来覆盖它们。 For instance, usually this one is also required: 例如,通常还需要以下一项:

monocle.stackSize=128000

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM