开发者

How to emulate double tap on one tap?

For example

   mainEdit.setOnClickListener(new OnClickListener() {  
        int i = 0;
            public void onClick(View v) {
                //here something 开发者_StackOverflowthat causing double tap event
            }
        });

How can i archive that?


Android doesn't support double tap by default. You can kind of get the same effect by using a normal OnClickListener that stores a timestamp and checks to see if the stored value is close enough to the current time to count as a double click. You could even make your own Listener class that behaves this way. But I am unsure what you mean when you say: "here something that causing double tap event" Since nothing in android responds to double taps by default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜