Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [Android] OnTouchEvent of ContentView is not called when adding Tap gesture to the parent for the content view. #15645

Open
EswaranSyncfusion opened this issue Dec 30, 2022 · 0 comments
Labels

Comments

@EswaranSyncfusion
Copy link

EswaranSyncfusion commented Dec 30, 2022

Description

I used ContentView to construct a custom control, and I override the OnTouchEvent event to handle touch input. All are worked as expected. But after I have added a grid layout with a tap gesture as a content of my control, the OnTouchEvent override method in my CustomControl not getting called when I try to interact with grid layout. The OnTouchEvent override method calls properly if I remove the tap gesture from the grid.

Steps to Reproduce

  1. Run the attached sample
  2. Touch the content view
  3. Check whether the OnTouchEvent is called or not.

Expected Behavior

The OnTouchEvent override method should be called.

Actual Behavior

The OnTouchEvent is not called.

Basic Information

  • Version with issue: Xamarin.Forms(5.0.0.2012)
  • Last known good version:
  • Platform Target Frameworks: Android
    • Android: Android 11 or above
  • Android Support Library / AndroidX Version: Not applicable
  • NuGet Packages: Xamarin.Forms(5.0.0.2012)
  • Affected Devices: Pixcel 5 (Android 11 API 30) or RedMI 11I (Android 12 API 31)

Environment

Microsoft Visual Studio Professional 2022
Version 17.5.0 Preview 2.0
VisualStudio.17.Preview/17.5.0-pre.2.0+33209.295
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Professional

Visual C++ 2022 00476-80000-00000-AA522
Microsoft Visual C++ 2022

ASP.NET and Web Tools 17.5.194.32986
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.5.194.32986
Azure App Service Tools v3.0.0

C# Tools 4.5.0-2.22580.13+ea0b6351c129c7decd9bf76f4388239509e28e0d
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Extensibility Message Bus 1.4.1 (main@2ee106a)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio 17.5.2 (d15e47f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.0.0.2255201+5530de5c8323cd1ecacb497bbab5637907d0fc02
Provides languages services for ASP.NET Core Razor.

Syncfusion Xamarin Project Templates 20.4.0.38
A multi-project template for building iOS, Android, and Windows apps using Syncfusion Xamarin components.

Syncfusion Xamarin Toolbox 20.4.0.38
Syncfusion Essential Studio for Xamarin Toolbox Visual Studio extension.

SyncfusionMenu Extension 20.4.0.38
SyncfusionMenu Visual Studio Extension Detailed Info

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools 17.0.11130.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.5.0-2.22580.13+ea0b6351c129c7decd9bf76f4388239509e28e0d
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android) 17.0.33208.234
Visual C++ for Cross Platform Mobile Development (Android)

Visual F# Tools 17.5.0-beta.22607.4+f5794982b82d308590542bd1e101162dc4f45a13
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

VSPackage Extension 1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin 17.5.0.120 (main@4c08778)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.5.2.64 (remotes/origin/d17-5@627f860876)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.5.3 (3c53880)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 13.1.99.61 (main/2e10309)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 6dd9def
Java.Interop: xamarin/java.interop/main@984711a3
SQLite: xamarin/sqlite@fdc1e34
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@fa3711b

Xamarin.iOS and Xamarin.Mac SDK 16.1.1.27 (933c6c2c9)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Screenshots

Not Applicable.

Issue Reproducing Sample

CustomMyApp.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@jsuarezruiz @EswaranSyncfusion and others