Divers
Divers

Reputation: 9569

How to emulate double tap on one tap?

For example

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

How can i archive that?

Upvotes: 0

Views: 1810

Answers (1)

FoamyGuy
FoamyGuy

Reputation: 46856

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.

Upvotes: 1

Related Questions