Given a PopupWindow
defined like this:
public class MyWindow extends PopupWindow implements View.OnTouchListener {
MyWindow(View view) {
super(view);
setHeight(view.getMeasuredHeight());
setFocusable(true);
setTouchable(true);
setTouchInterceptor(this);
}
public boolean onTouch(View v, MotionEvent event) {
System.out.println("onTouch()");
return true;
}
}
for some reason, onTouch()
is never called.
What am I doing wrong? How can I get the PopupWindow
to accept touch events?