Skip to content

Instantly share code, notes, and snippets.

View Benjoyo's full-sized avatar

Bennet Benjoyo

  • Holisticon AG
  • Hamburg, Germany
View GitHub Profile
@Benjoyo
Benjoyo / LongPress.kt
Created February 5, 2017 15:55
Android custom long press time/delay
import android.app.Fragment
import android.graphics.Rect
import android.os.Handler
import android.view.MotionEvent
import android.view.View
import android.view.ViewConfiguration
class LongPress: Fragment(), View.OnTouchListener {
val LONG_PRESS_DELAY = 500