Hello,
Welcome to our Microsoft Q&A platform!
Android.Views.View
class doesn't provide the method to remove the onTouchListener. A workaround is to set another touchListener to the view instead and do nothing in the OnTouch event.
Here is the sample code, you could refer to it.
private void Button2_Click(object sender, System.EventArgs e)
{
gamearea.SetOnTouchListener(new DoNothing_TouchListener());
}
class DoNothing_TouchListener : Java.Lang.Object, IOnTouchListener
{
public bool OnTouch(View v, MotionEvent e)
{
return false;
}
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.