[Solved] Click, Doble click and Hold Button


button.setOnLongClickListener and button.setOnClickListener should do the trick for long and single clicks respectively.

For double tap here’s what I do in the setOnClickListener.

boolean click=false;

    button.setOnClickListener(new OnClickListener() {
        public void onClick(View arg0) {
    if(click==true)
    //DO SOMETHING 
     new Handler().postDelayed(new Runnable(){
        public void run(){
              click=true;
        }, 1000};
    });

solved Click, Doble click and Hold Button