Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PointerGestureRecognizer Does not work on android #22199

Closed
ASiNet-ASiDev opened this issue May 3, 2024 · 6 comments
Closed

PointerGestureRecognizer Does not work on android #22199

ASiNet-ASiDev opened this issue May 3, 2024 · 6 comments
Labels
area-gestures Gesture types platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@ASiNet-ASiDev
Copy link

ASiNet-ASiDev commented May 3, 2024

Description

My code:

<?xml version="1.0" encoding="utf-8" ?>
<Border xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
        x:Class="WCPApp.Viewe.Joystick"
        WidthRequest="400" HeightRequest="400" Background="#444444">
    <Border.StrokeShape>
        <RoundRectangle CornerRadius="50"/>
    </Border.StrokeShape>
    <Border.GestureRecognizers>
        <PointerGestureRecognizer PointerMoved="PointerGestureRecognizer_PointerMoved" 
                                  PointerPressed="PointerGestureRecognizer_PointerPressed"
                                  PointerReleased="PointerGestureRecognizer_PointerReleased"
                                  PointerExited="PointerGestureRecognizer_PointerExited"/>
    </Border.GestureRecognizers>
    <Path x:Name="PointerHandler" Fill="#FFFFFF" 
      WidthRequest="40"
      HeightRequest="40">
        <Path.Data>
            <EllipseGeometry RadiusX="20" RadiusY="20" Center="20, 20"/>
        </Path.Data>
    </Path>
</Border>

Outputs this to the console:

[AutofillManager] requestHideFillUi(null): anchor = null
[AutofillManager] requestHideFillUi(null): anchor = null
[AutofillManager] requestHideFillUi(null): anchor = null

Events are not triggered, while if you run on Windows everything works fine

Steps to Reproduce

Try to get gesture events by creating similar code like mine

Link to public reproduction project repository

No response

Version with bug

8.0.7, 8.0.14, 8.0.21

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 13

Did you find any workaround?

No, I didn't find it.

Relevant log output

No response

@ASiNet-ASiDev ASiNet-ASiDev added the t/bug Something isn't working label May 3, 2024
Copy link
Contributor

github-actions bot commented May 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jsuarezruiz jsuarezruiz added the area-gestures Gesture types label May 3, 2024
@jfversluis jfversluis added the s/needs-repro Attach a solution or code which reproduces the issue label May 4, 2024
@ASiNet-ASiDev
Copy link
Author

Hello, here is a link to the project where I am having problems with PointerGestureRecognizer on Android:
https://github.com/ASiNet-ASiDev/Issue22199.PointerGestureRecognizerExample

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels May 4, 2024
@ASiNet-ASiDev
Copy link
Author

ASiNet-ASiDev commented May 4, 2024

Wndows output:

PointerExited
PointerPressed
PointerMoved
PointerMoved
PointerMoved
PointerMoved
PointerMoved
PointerReleased
PointerExited

Android output:

[AutofillManager] requestHideFillUi(null): anchor = null
[AutofillManager] requestHideFillUi(null): anchor = null
[ScrollIdentify] on fling
[AutofillManager] requestHideFillUi(null): anchor = null
[ScrollIdentify] on fling
[AutofillManager] requestHideFillUi(null): anchor = null
[AutofillManager] requestHideFillUi(null): anchor = null
[ScrollIdentify] on fling
[AutofillManager] requestHideFillUi(null): anchor = null

I find this behavior quite strange, and I can't get PointerGestureRecognizer to work on my Android device :(

@ASiNet-ASiDev
Copy link
Author

I tested my project on different versions of maui 8.0.x, the result is the same everywhere.

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 6, 2024
@Zhanglirong-Winnie
Copy link

Zhanglirong-Winnie commented May 6, 2024

Verified this issue with Visual Studio 17.10 Preview 6.0 (8.0.21). Can repro on android platform with sample project.

@PureWeen
Copy link
Member

PureWeen commented May 7, 2024

Duplicate of #20849

@PureWeen PureWeen marked this as a duplicate of #20849 May 7, 2024
@PureWeen PureWeen closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-gestures Gesture types platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants