這是我的popupwindow。但處理任何觸摸事件..Android彈出窗口onTouchIntercept不工作
popup = new PopupWindow(popupView, 300, 300, true);
popup.showAsDropDown(v, -30, 0);
popup.setBackgroundDrawable(getResources().getDrawable(R.drawable.background));
popup.setOutsideTouchable(true);
popup.setTouchable(true);
popup.setFocusable(true);
popup.setTouchInterceptor(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.d("TAG", "Touched in the window");
return false;
}
});
請告訴我問題,此代碼..
固定......對不起!讓你們感到困擾.. –