Change long click delay

后端 未结 7 1653
不知归路
不知归路 2020-12-09 08:45

I am listening for a View\'s long click events via setOnLongClickListener(). Can I change the long click delay / duration?

7条回答
  •  被撕碎了的回忆
    2020-12-09 09:30

    AFAIK, no. It is hard-wired in the framework via getLongPressTimeout() on ViewConfiguration.

    You are welcome to handle your own touch events and define your own "long click" concept. Just be sure that it is not too dramatically different from what the user expects, and most likely the user will expect what all the other apps use, which is the standard 500ms duration.

提交回复
热议问题