maui icon indicating copy to clipboard operation
maui copied to clipboard

Issue with Clipping in CustomControl within SwipeView RightItems in CollectionView on Android

Open Ahamed-Ali opened this issue 1 year ago • 2 comments
trafficstars

Description

We have identified a critical issue in our current implementation involving a CollectionView with loaded items, where the ItemTemplate includes a SwipeView with right items containing a custom control (GraphicsView) drawn from an IDrawable. The problem arises when applying the clip property within the custom control.

Upon deploying the CollectionView on Android, we have observed that during the initial swipe right, only one drawn view is displayed, while the others remain hidden. However, on the second swipe right, all views are properly rendered.

After a thorough investigation, we have determined that the clipping inside the custom control is causing this anomaly. Without the clipping, the behavior is as expected.

This issue is of high priority, and we urgently need a resolution to ensure a seamless user experience. Please review the attached video for a visual representation of the problem.

Your prompt attention to this matter is greatly appreciated, and we look forward to a quick and effective solution.

We have attached the video for your reference.

Android :

https://github.com/dotnet/maui/assets/102580874/f45eab1f-9925-45dd-b8b0-a58bda29f770

Steps to Reproduce

  1. Obtain the sample from the given repository and deploy it.
  2. you can observe that during the initial swipe right, only one drawn view is displayed, while the others remain hidden. However, on the second swipe right, all views are properly rendered.
  3. This is the bug.

Link to public reproduction project repository

https://github.com/Ahamed-Ali/CustomControlClipping

Version with bug

8.0.5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

By putting each CustomControl instance inside a separate grid, works fine

` <Grid Grid.Row="0" Grid.Column="1"> <local:CustomControl Grid.Row="0" Grid.Column="1" MinimumHeightRequest="60" MinimumWidthRequest="60">

                                            </local:CustomControl>
                                        </Grid>`

Relevant log output

No response

Ahamed-Ali avatar Jan 16 '24 11:01 Ahamed-Ali

Verified this on 8.0.6. Repro on Android 14.0-API34, not repro on iOS 17.2 with below Project: ClippingIssue.zip

XamlTest avatar Feb 23 '24 07:02 XamlTest

Any news on this? Has been open for 5 months but still no fix? Thank you.

MattePozzy avatar May 24 '24 15:05 MattePozzy