Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions maui/src/NavigationDrawer/SfNavigationDrawer.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal override bool OnInterceptTouchEvent(MotionEvent? ev)
switch (ev.Action)
{
case MotionEventActions.Down:
return HandleActionDown(currentTouchPoint);
return HandleActionDown(ev, currentTouchPoint);

case MotionEventActions.Up:
_initialPoint = new Point(0, 0);
Expand All @@ -95,18 +95,23 @@ internal override bool OnInterceptTouchEvent(MotionEvent? ev)

#region Private Methods

private bool HandleActionDown(Point currentTouchPoint)
private bool HandleActionDown(MotionEvent? ev, Point currentTouchPoint)
{
_downX = currentTouchPoint.X;
_downY = currentTouchPoint.Y;
_initialPoint = currentTouchPoint;

if (DrawerSettings.Position == Position.Left || DrawerSettings.Position == Position.Right)
if (ev != null)
{
return HandleHorizontalActionDown(currentTouchPoint);
_downX = ev.GetX();
_downY = ev.GetY();
_initialPoint = currentTouchPoint;

if (DrawerSettings.Position == Position.Left || DrawerSettings.Position == Position.Right)
{
return HandleHorizontalActionDown(currentTouchPoint);
}

return HandleVerticalActionDown(currentTouchPoint);
}

return HandleVerticalActionDown(currentTouchPoint);
return false;
}

private bool HandleHorizontalActionDown(Point currentTouchPoint)
Expand Down