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

Android Menus display InputGesture in a non-friendly way. #15392

Open
IanRawley opened this issue Apr 16, 2024 · 0 comments · May be fixed by #15393
Open

Android Menus display InputGesture in a non-friendly way. #15392

IanRawley opened this issue Apr 16, 2024 · 0 comments · May be fixed by #15393

Comments

@IanRawley
Copy link
Contributor

Describe the bug

When a MenuItem has a Gesture set to the InputGesture, on Android devices the gesture displays the Key enum string rather than a more userfriendly version. For example "OemPeriod" instead of "."

This is because the PlatformKeyGestureConverter used (at least by the Simple theme) doesn't have a specific Android case, and falls back to KeyGesture.ToString() rather than using it's own methods for more user friendly string creation.

To Reproduce

Add an InputGesture of, for example "Meta+." to a MenuItem and open the menu on Android. Screenshots below.

Windows:
Win11 Screenshot

Android:
Android Screenshot

Expected behavior

Android also displays userfriendly strings rather than Key enum values.

Avalonia version

11.1.0-beta1

OS

Android

Additional context

Pull Request coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants