Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Numeric keyboard should be able to process all available keys #396

Closed
wants to merge 5 commits into from
Closed

[Android] Numeric keyboard should be able to process all available keys #396

wants to merge 5 commits into from

Conversation

adrianknight89
Copy link
Contributor

@adrianknight89 adrianknight89 commented Sep 30, 2016

Description of Change

Android numeric keyboard displayed 14 keys (https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/choose-keyboard-for-entry/), but only the digits along with the dot character were processed. This ensures that all characters can be input.

Steps to verify changes:

  • Install Google Keyboard from the play store
  • Change your input language to Swedish
  • Run sample code
  • Initially, KeyListener should listen for the 14 keys.
  • Change keyboard type by tapping on the button
  • KeyListener should be set to the proper listener

InputType = InputTypes.ClassNumber | InputTypes.NumberFlagSigned | InputTypes.NumberFlagDecimal does not work (tested on S6 / M) probably because of Android fragmentation.

IMO, entry validation should be left to the developer (see user's request). The simplest way to validate numbers is with double.Parse(text, CultureInfo.CurrentCulture), but for whatever reason custom validation might be required or the UI might be tasked to react as the entry changes from a valid number to an invalid number or vice versa.

You might see this bug while testing the sample. Please note that this is an existing bug.

Bugs Fixed

@dnfclas
Copy link

dnfclas commented Sep 30, 2016

Hi @adrianknight89, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@adrianknight89
Copy link
Contributor Author

@kingces95 Anything happening for this PR?

@hartez
Copy link
Contributor

hartez commented Jan 25, 2017

I've created PR 719 as a proposed alternative to this fix.

mattleibow pushed a commit that referenced this pull request Jan 28, 2021
…ormation. (#396)

* If activity is required and null throw null exception with information.

* Remove currentactivity and update getcurrentactivity.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants