开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜