xuxiuxi
2017-03-28 d5acf96e62637819d1cd55b516dd03e9232e3971
VisitFace/DemoForBsk/app/src/main/java/com/bsk/zhangbo/demoforbsk/widget/SingleSelectionPopup.java
@@ -68,23 +68,23 @@
        view.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                View popLayout = view.findViewById(R.id.pop_single_ll);
                int top = popLayout.getTop();
                int bottom = popLayout.getBottom();
                int left = popLayout.getLeft();
                int right = popLayout.getRight();
                int y = (int) motionEvent.getY();
                int x = (int) motionEvent.getX();
                if (motionEvent.getAction() == MotionEvent.ACTION_UP){
                    if (y<top || y> bottom){
                        dismiss();
                    }
                    if (x < left || x > right){
                        dismiss();
                    }
            View popLayout = view.findViewById(R.id.pop_single_ll);
            int top = popLayout.getTop();
            int bottom = popLayout.getBottom();
            int left = popLayout.getLeft();
            int right = popLayout.getRight();
            int y = (int) motionEvent.getY();
            int x = (int) motionEvent.getX();
            if (motionEvent.getAction() == MotionEvent.ACTION_UP){
                if (y<top || y> bottom){
                    dismiss();
                }
                return true;
                if (x < left || x > right){
                    dismiss();
                }
            }
            return true;
            }
        });