多长时间事件onLong preSS在Android?多长时间、事件、onLong、preSS

2023-09-05 10:07:57 作者:忘记,所谓的未来

Android支持的事件onLong preSS。我的问题是'多久'(以毫秒为单位)是preSS触发事件?

Android supports an event onLongPress. The question I have is 'how long' (in milliseconds) is the 'press' to trigger the event?

推荐答案

标准的长preSS时间是什么返回 getLong之pressTimeout(),这是目前500毫秒,但可能会改变(在1.0是1000毫秒,但在以后的版本改变;也许在未来这将是用户自定义)。

The standard long press time is what is returned by getLongPressTimeout(), which is currently 500ms but may change (in 1.0 it was 1000ms but changed in a later release; maybe in the future it will be user-customizable).

浏览器使用它自己的长preSS时间,因为它有一些更复杂的相互作用。我相信这应该是1000,虽然这又可能在未来改变。它不加入不同的超时在一起。

The browser uses its own long press time because it has some more complicated interactions. I believe this should be 1000, though again it may change in the future. It is not adding the different timeouts together.