在OnLongPress Android中处理ACTION_UP

当用户将手指从屏幕上移开时,我需要做一些操作。

gestureDetector = GestureDetector(this, object : GestureDetector.SimpleOnGestureListener() { override fun onLongPress(e: MotionEvent) { if(e.getAction() == MotionEvent.ACTION_UP){ //This block is not handled } } }) 

如何解决? 不要建议我使用onTouch