Android: delegate touch event to underlaying view

前端 未结 3 784
旧时难觅i
旧时难觅i 2020-12-24 13:54

I have the following hierarchy: Activity -> PopupWindow -> CustomView

My the PopupWindow itself is a square, but

3条回答
  •  心在旅途
    2020-12-24 14:14

    Try setting these on your PopupWindow instance:

    window.setBackgroundDrawable(new BitmapDrawable());

    window.setOutsideTouchable(true);

    and

    window.setTouchable(true);

    This is just a suggestion... I haven't tested it. Let me know if it works.

    [Note: This is for the onTouch() to get called on touch events..]

提交回复
热议问题