Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] Swipe view bug when having a tap gesture recognizer associated to the swipe item

Open HuckleChuckleDog opened this issue 3 years ago • 3 comments

Description

There are a couple of different bugs here -- I have a test project set up https://github.com/HuckleChuckleDog/ColViewBug/tree/master with a ReadMe.txt explaining issue.

One issue: This issue is only for some Android Devices such as the Samsung Note 10+ and galaxy, it doesn't appear to be an issue on the Plus One. When setting up a swipe view, if the swipe content consists of a content view control e.g. control created to be reused and there is a tap gesture recognizer assigned to the content view -- In this scenario we have a stack layout with a collection assigned to the BindableLayout.ItemSource, when pressing a swipe view item which should've triggered the content views tap gesture, it actually is triggering the swipe views events for Swipe Started, Swipe Changing & Swipe ended. Occasionally it triggers the tap gesture -- This isn't an issue on iOS or emulator and only an issue with some android devices "not sure how many devices this will be an issue for as we only have a couple to test with" NOTE -- One change did fix this behavior for Android, but presented a different problem for iOS. If you comment out the tap gesture recognizer in the control used for the swipe item, and assign the tap gesture recognizer directly to the swipe view e.g. <SwipeView.GestureRecognizers> </SwipeView.GestureRecognizers>, the tap gesture for an item in the collection correctly fires for Android, however for iOS it will fire 2 commands if pressing one of the swipe actions buttons, it will fire the command for the swipe action button pressed as well as the command assigned to the tap gesture.

Second issue: There is a work around for this and is only an issue for some android devices: If you set up the swipe view with custom swipe items e.g. between the swipe item view tags you have buttons, then the button events are not always firing when being pressed, however if you set up the swipe view to use swipe item between the swipe items tag, then the command for the <swipeItem> fires correctly.

Steps to Reproduce

  1. Download project from https://github.com/HuckleChuckleDog/ColViewBug/blob/master -- Ideally if this project was run on a Samsung Note 10+ or galaxy, then the issues described above should show -- This won't show as an issue if running from an emulator.

Expected Behavior

That the swipe item could have a tap gesture assigned to it to provide functionality of a click event from the actual item as well as swipe action buttons

Actual Behavior

This seems to be an issue only for some Android devices, and depending on the set up listed above could be an issue for iOS

Basic Information

  • Version with issue:

  • 5.0.0.2012

  • Last known good version:

  • N/A

  • Platform Target Frameworks:

    • iOS:
    • Android:
  • Android Support Library / AndroidX Version:

  • NuGet Packages:

  • NETStandard.Library

  • Refractored.MvvmHelopers

  • Xamarin.Essentials

  • Xamarin.Forms

  • Affected Devices: Samsung Note 10+, Galaxy -- Will likely be more, however this is all i have to test with

Environment

Show/Hide Visual Studio info
Microsoft Visual Studio Enterprise 2019 (2)
Version 16.8.5
VisualStudio.16.Release/16.8.5+31005.135
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Enterprise

ASP.NET and Web Tools 2019   16.8.559.8768
ASP.NET and Web Tools 2019

ASP.NET Core Razor Language Services   16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2019   16.8.559.8768
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.8.559.8768
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   16.8.559.8768
Azure Functions and Web Jobs Tools

BusinessObjectEditor   1.0
Information about my package

C# Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

ConvertToDevExtremeCommand Extension   1.0
ConvertToDevExtremeCommand Visual Studio Extension Detailed Info

CreateLayoutWizard   1.0
Create layout wizard.

DevExpress Reporting Extension   1.0
A Visual Studio extension that invokes the Report Designer editor for report definition REPX files.

DevExpress.DeploymentTool   1.0
A useful tool for deploying DevExpress assemblies.

DevExpress.ExpressApp.Design.DynamicPackage   1.0
DevExpress VSIX Package

DevExpress.ExpressApp.DesignPackage   1.0
DevExpress VSIX Package

DevExpress.Win.LayoutAssistant Extension   1.0
DevExpress.Win.LayoutAssistant Visual Studio Extension Detailed Info

Extensibility Message Bus   1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

GitHub.VisualStudio   2.11.106.19330
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

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

Microsoft Library Manager   2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Mono Debugging for Visual Studio   16.8.43 (00471f8)
Support for debugging Mono processes with Visual Studio.

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

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

SettingsWindow Extension   1.0
SettingsWindow Visual Studio Extension Detailed Info

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   16.0.62102.01130
Microsoft SQL Server Data Tools

TypeScript Tools   16.0.21016.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions   1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Foo   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

WiX Toolset Visual Studio Extension   1.0.0.4
WiX Toolset Visual Studio Extension version 1.0.0.4
Copyright (c) .NET Foundation and contributors. All rights reserved.

Xamarin   16.8.000.262 (d16-8@4d60f9c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   16.8.0.507 (remotes/origin/d16-8@e87b24884)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   16.8.112 (86385a3)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   11.1.0.26 (d16-8/a36ce73)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: 5e9cb6d
    Java.Interop: xamarin/java.interop/d16-8@79d9533
    ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
    SQLite: xamarin/sqlite/3.32.1@1a3276b
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc


Xamarin.iOS and Xamarin.Mac SDK   14.10.0.4 (5a05865f6)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Logs

Screenshots

Reproduction Link

https://github.com/HuckleChuckleDog/ColViewBug/blob/master

Workaround

Have included a work around in above notes, also in ReadMe.Txt for github example

HuckleChuckleDog avatar Mar 09 '21 03:03 HuckleChuckleDog

Experiencing the same issues as @HuckleChuckleDog on my S10. Workaround works nicely, but blocks the buttons on the underlying view.

@jsuarezruiz Any progress on this?

vikern22 avatar Apr 14 '21 08:04 vikern22

@jsuarezruiz -- Is there no longer any support for Xamarin forms bugs? We have a frustrating issue where swipe view isn't working correctly on Android "works fine on iOS" -- therefore our solution was to replace the swipe view for a double click gesture to open an action select dialog, however the double click gesture doesn't work on iOS -- This isn't ideal as it really leaves us with having to do messy work arounds. This issue was raised 2 months ago and it appears little to nothing has been done on it?

krmWorkAccnt avatar May 20 '21 22:05 krmWorkAccnt

Same issue on samsung gallaxy. There is no maintenance on xamarin anymore?

pabloat81 avatar Aug 26 '22 17:08 pabloat81