Problems with typing Firemonkey Android virtual keyboard

I have an application running on Android devices (5, 6 and 7) and it presents a problem in typing the words-different from autocomplete-because it simply repeats letters randomly. This same problem already occurred in Delphi XE8. I even tried some suggestions to change the keyboard (KeyboardType = Alphabet), but to no avail. Any tips? Grateful!

Author: dvdmengarda, 2018-03-20

1 answers

Had the same problem as you using Delphi XE7, went through several tests and realized that none of KeyBoardType did not solve, Alphabet uses the suggestions of the Android virtual keyboard. Both the mobile keyboard and the GBoard (Google Keyboard) did not work.

I tested with KeyBoardType = Alphabet but with the option Password checked, if you observe it does not use keyboard suggestions and was no longer repeating the letters that by the way for me would solve, but has a though, with the option Password checked it only appears symbols and even with the button to have the possibility to view what is being typed was no use.

So I had to make a small change. Search by unit FMX.Platform.Android responsible for Android KeyBoard controls among other things. Make a copy of that unit and paste it into your project folder and declare it in the project uses, to start picking up the changes from that unit.

With the open unit searches for the function EnterControl and HandleVK where the next call

FTextView.setIsPassword (Password)

Change to

FTextView.setIsPassword (True)

It will activate the Password option without the keyboard suggestions and with the possibility of viewing what is being typed without having a button to do so. For me it solved.

 2
Author: Jefferson Rudolf, 2018-03-22 19:47:55