Cheesebaron.SlidingUpPanel.SlidingUpPanelLayout.IsDragViewUnder C# (CSharp) Method

IsDragViewUnder() private method

private IsDragViewUnder ( int x, int y ) : bool
x int
y int
return bool
        private bool IsDragViewUnder(int x, int y)
        {
            var dragView = _dragView ?? _slideableView;
            if (dragView == null) return false;

            var viewLocation = new int[2];
            dragView.GetLocationOnScreen(viewLocation);
            var parentLocation = new int[2];
            GetLocationOnScreen(parentLocation);

            var screenX = parentLocation[0] + x;
            var screenY = parentLocation[1] + y;
            return screenX >= viewLocation[0] && screenX < viewLocation[0] + dragView.Width &&
                   screenY >= viewLocation[1] && screenY < viewLocation[1] + dragView.Height;
        }