I have created the system overlay from the example here.
In the SampleOverlayView.java
there is a method for move event like this:
@Override
protected void onTouchEvent_Move(MotionEvent event) {
info.setText("MOVE\nPOINTERS: " + event.getPointerCount());
}
I wish I could use this to move my overlay. I found the solution for moving my overlay (when I move the view, it does follow my finger movement). The solution is over here
This solution uses, onTouch
method, which gives the View
and MotionEvent
params. But in my case I dont have view
object. View can be anything ( as its an overlay).Have only event
param.
Any idea of how I can move overlay within my screen?
Thanks in advance