-
Notifications
You must be signed in to change notification settings - Fork 1.9k
PointerGestureRecognizer Does Not Work on Android #20849
Copy link
Copy link
Closed
Labels
area-gesturesGesture typesGesture typesplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
I am not able to get the PointerPressed event of PointerGestureRecognizer to work on Android. A brief look at the code would suggest its not even been implemented. I was trying to achieve a long press and managed to get this to work on Windows but on Android it does not work. After going round in a few circles it appears this just does not work on Android but I can find very little info to confirm this. The original task to implement Pointer gestures seems to not include an Android implemtation.
Steps to Reproduce
- Create New Maui App
- Modify the code as bellow:
<Label
Text="Hello, World!"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" >
<Label.GestureRecognizers>
<PointerGestureRecognizer PointerPressed="PointerGestureRecognizer_PointerPressed" />
</Label.GestureRecognizers>
</Label>
private void PointerGestureRecognizer_PointerPressed(object sender, PointerEventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
}
- Run on Android and press the Hello World label, the counter is not incremented but on Windows and IOS it is.
Link to public reproduction project repository
No response
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-gesturesGesture typesGesture typesplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working