An open API service indexing awesome lists of open source software.

https://github.com/jayantgoel001/double-click-listener


https://github.com/jayantgoel001/double-click-listener

android double-click jitpack kotlin

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# Double-Click-Listener



How to







To get a Git project into your build:



## Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

	allprojects {

repositories {
...
maven
{ url 'https://jitpack.io' }
}
}


## Step 2. Add the dependency

	dependencies {

implementation 'com.github.CormacKrum:Double-Click-Listener:0.1.3'
}

# Basic Usage

The class DoubleClickListener extends from View.OnClickListener so, just call the DoubleClickListener class on your onClickListener
of the view that you wish to listen, and pass an object of DoubleClickListener.Callback class to listen the events.You can also add custom time difference betweens click by default is 1000ms.

* **Kotlin**

    button.setOnClickListener(

DoubleClickListener(
callback = object : DoubleClickListener.Callback {
override fun doubleClicked() {

}
},1000
)
)

* **Java**

    button.setOnClickListener(

DoubleClickListener(
object = new DoubleClickListener.Callback {
override fun doubleClicked() {

}
},1000
)
)

Share this release:

[![](https://jitpack.io/v/CormacKrum/Double-Click-Listener.svg)](https://jitpack.io/#CormacKrum/Double-Click-Listener)