Long click on rectangle
I created a view with rectangles which开发者_开发知识库 are clickable using the method onTouchEvent (using ACTION_DOWN motion). I want to enable a long click on the rectangle which open a dialog, and I tried to do it using ACTION_UP, but then the dialog is presented only after I release the finger. How can I do it in the same way that OnLongClickListener of buttons do?
Set the onLongClickListener:
http://developer.android.com/reference/android/view/View.html#setOnLongClickListener(android.view.View.OnLongClickListener)
精彩评论