Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如
mainEdit.setOnClickListener(new OnClickListener() { int i = 0; public void onClick(View v) { //here something that causing double tap event } });
我该如何存档?
Android 默认不支持双击。您可以通过使用存储时间戳的普通 OnClickListener 来获得相同的效果,并检查存储的值是否与当前时间足够接近以算作双击。您甚至可以创建自己的 Listener 类以这种方式运行。但我不确定你说的是什么意思:“这里有一些导致双击事件的东西”因为默认情况下android中没有任何响应双击。