FloatWindow icon indicating copy to clipboard operation
FloatWindow copied to clipboard

如何 指定拖的范围,不让用户拖出指定的范围

Open zr940326 opened this issue 6 years ago • 4 comments

image 我需求是,在状态栏 下面,和 底部导航栏的上面

zr940326 avatar May 14 '18 11:05 zr940326

希望大佬,看到后,及时回复我一下

zr940326 avatar May 14 '18 11:05 zr940326

+1

xuminmin0405 avatar May 22 '18 06:05 xuminmin0405

+1

byte-art avatar Jul 05 '18 04:07 byte-art

case MotionEvent.ACTION_MOVE:
                               changeX = event.getRawX() - lastX;
                               changeY = event.getRawY() - lastY;
                               newX = (int) (mFloatView.getX() + changeX);
                               newY = (int) (mFloatView.getY() + changeY);
                               Log.e("floatTest","newY is " + newY + " newX is " + newX);
                               if (newY < 0) {
                                   newY = 0;
                               }
                               int i = Util.getScreenHeight(mB.mApplicationContext) - 400;
                               if (newY > i) {
                                   newY = i;
                               }
                               mFloatView.updateXY(newX, newY);``

workofgao avatar Aug 28 '18 07:08 workofgao