Jump to content
Sign in to follow this  
Bert-Jan

RAD 10.4 Android KeyboardType NumbersAndPunctuation not working

Recommended Posts

It seems keyboardType.NumbersAndPunctuation defaults to DecimalNumberPad with Android (compiled in 10.4).

 

Does anyone have the same experience or am I overlooking something?

 

 

Share this post


Link to post
7 hours ago, Bert-Jan said:

am I overlooking something?

The FMX Java code has:

    NUMBER_AND_PUNCTUATION(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL),

    NUMBER_DECIMAL(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED);

So they are the same (just or'd in a different order). I doubt whether there's an exact equivalent to iOS, on Android.

Share this post


Link to post

Yes I was also missing that too, and even would like to customize the keyboard.

Seems that this ends up in a lot of fumble jumble.

https://medium.com/@ssaurel/learn-to-create-a-system-keyboard-on-android-95aca21b1e5f

https://medium.com/@ssaurel/creating-an-in-app-keyboard-for-your-android-apps-a0a6c6e1e289

 

Not even checked for the iOS side.

 

I hope that Embarcadero will work their fingers to the bone one day :classic_blush:

Share this post


Link to post
On 7/2/2020 at 12:23 AM, Dave Nottage said:

The FMX Java code has:


    NUMBER_AND_PUNCTUATION(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL),

    NUMBER_DECIMAL(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED);

So they are the same (just or'd in a different order). I doubt whether there's an exact equivalent to iOS, on Android.

Thank you. They used to be different.

Share this post


Link to post

I seem to have more issues with the keyboard type. Now with iOS. iOS only seems to work properly if I use the default Keyboard type.

Share this post


Link to post

Sorry for responding to an old post, but I wonder if the issue I notice is related.

Put on a form 3 TEdits

Give them different Keyboardtypes.

tap in an Tedit, the correct keyboard is shown.

Don't use the returnkey, but tap in the next Tedit.

On Android, this works okay, the correct keyboardlayout is shown.

On iOS, the keyboardtype from the first edit remains visible.

 

Is this an iOS issue or a Firemonkey issue?

Thanks,

John

 

Share this post


Link to post

@John van de Waeter the solution for your problem is add unit FMX.VirtualKeyboard.iOS.pas to the project and comment out two lines near the bottom of the file, on "function TCocoaVirtualKeyboardService.HideVirtualKeyboard: Boolean;":

 

  //if FTransient then    // <- comment out this
  //  Exit(False);        // <- and this

 

More info here: https://quality.embarcadero.com/browse/RSP-30045

  • Like 2
  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×