class - Android: Use onTouch and OnLongClick in my view -
i have problem. impossible use onlongclick in view element. created class , in there have 2 processings of events of ontouch , onlongclick.
public class myclass extends surfaceview implements surfacehilder.callback { ... //i define thread , constructor ... public boolean ontouch(motionevent ev) { ... // here work in touch events ... return true; }
now correct me declare onlongclick in class. desirable knew coordinates of defined event.
not sure if you're looking for, onlongpress use this:
buttonname.setonlongclicklistener(new view.onlongclicklistener() { public boolean onlongclick(view v) { //whatever method want call return true; } });
Comments
Post a Comment