Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: TEdit nigtmare problem (Tokyo 10.2.2 and all below)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 16 - Last Post: Jan 15, 2018 3:04 PM Last Post By: Horácio Filho
Rick Oconnel

Posts: 8
Registered: 1/7/02
TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 2:36 AM
I have a nightmarish problem with TEdit control. I'm using Firemonkey (RadStudio Tokyo 10.2.2) to create app for Android operating system. The problem I have, is that when entering the text into TEdit via virtual Android keyboard auto-correcting system totally destroys the input (or something else, I blame the auto-correct feature). The problem is not occuring on many devices, but is occuring on my Samsung Galaxy S8 - which is very popular device. It looks like this for example - I'm entering a URL: http://somedomain.com/slash/something - auto-correct will often destroys the text and it becomes something like this: http://somedomain.com/somedomain.com/ - the text is duplicating itself. I can record video if such will be necessary.

What I tried and it didn't work:
- Setting KeyboardType to Alphabet or URL (auto-correction is still in full action it doesn't change anything on S8)
- I tried to overcome the problem with minor success parsing entered text in OnTyping event - it creates a lot of new problems and break auto-correct support.
- I tried to change control type to TYPE_TEXT_VARIATION_VISIBLE_PASSWORD - but the class that could change this is not public/hidden. So I can't.

Can anyone help me with this? TEdit is the major component in my apps. And it is not working correctly at all.

EDIT: Take a look at video to see the problem:
https://www.youtube.com/watch?v=bAih0nF7wPY

Edited by: Rick Oconnel on Jan 9, 2018 5:56 AM
Mida Converter

Posts: 77
Registered: 6/2/12
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 3:17 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Try TAlEdit native component

https://sourceforge.net/projects/alcinoe
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 3:33 AM   in response to: Mida Converter in response to: Mida Converter
Mida Converter wrote:
Try TAlEdit native component

https://sourceforge.net/projects/alcinoe

I tried it too. It doesn't compile under Tokyo 10.2.2 + even if I manage to compile it, the app doesn't start on Android (crash).
loki loki

Posts: 787
Registered: 7/1/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 9:15 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Rick Oconnel wrote:
Mida Converter wrote:
Try TAlEdit native component

https://sourceforge.net/projects/alcinoe

I tried it too. It doesn't compile under Tokyo 10.2.2 + even if I manage to compile it, the app doesn't start on Android (crash).

Can you please try again? source code was updated to work now with Tokyo 10.2.2 +

Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 12:05 AM   in response to: Mida Converter in response to: Mida Converter
Thank you everyone for help. I found fully working solution for my problem. This topic can be closed now.
Ronald Klitsche

Posts: 326
Registered: 8/26/01
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 4:58 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Rick Oconnel wrote:
Can anyone help me with this? TEdit is the major component in my apps. And it is not working correctly at all.

Works As Expected:
https://quality.embarcadero.com/browse/RSP-14831
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 5:23 AM   in response to: Ronald Klitsche in response to: Ronald Klitsche
Ronald Klitsche wrote:
Rick Oconnel wrote:
Can anyone help me with this? TEdit is the major component in my apps. And it is not working correctly at all.

Works As Expected:
https://quality.embarcadero.com/browse/RSP-14831

I only wanted to switch off auto-correction because there is a problem w TEdit itself. It is duplicating some phrases in URL links. It's impossible to enter URL address into TEdit without pasting it (if there is at least a part of URL in auto-correction already). In other words, auto-correction is fine. The problem is that TEdit don't work well with this auto-correction and duplicates entered words. I'm still waiting for some kind of solution for that problem.... :(
Horácio Filho

Posts: 146
Registered: 7/29/13
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2018 2:59 PM   in response to: Ronald Klitsche in response to: Ronald Klitsche
Ronald Klitsche wrote:
Rick Oconnel wrote:
Can anyone help me with this? TEdit is the major component in my apps. And it is not working correctly at all.

Works As Expected:
https://quality.embarcadero.com/browse/RSP-14831
Hello Ronald,

It was closed by me :) I understand your frustration, very sorry about that.

We can re-open the ticket and next consider a way to the FireMonkey accept a custom combination of flags from the developer conforming your needs, however, I would suggest that the developer understand the impacts on the text input experience when relying on custom flags (e.g. the emoji keyboard can disappear, the font can appear a bit different than the usual, the gesture typing can be disabled, the option to toggle the language can disappear, it is possible that the Korean input not work and many other issues).

The only thing I ask you this time is to click on the 'Dispute Resolution' button and I proceeds following the problem up internally upon your request :)

Thankfully,
Horácio Filho
--
Horácio Filho
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 5:57 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Video below shows the problem in action:
https://www.youtube.com/watch?v=bAih0nF7wPY
Francisco Peris

Posts: 91
Registered: 1/5/15
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 2:20 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Ok, so the corrector is changing the text. As expected by the user, because the user has selected this option.

You probably cannot change this from your application.

The only solution is that the user disable the word suggestions in Android's settings.

The only solution from your application would be accesing Android's settings...if possible.,
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 3:01 AM   in response to: Francisco Peris in response to: Francisco Peris
Francisco Peris wrote:
Ok, so the corrector is changing the text. As expected by the user, because the user has selected this option.

You probably cannot change this from your application.

The only solution is that the user disable the word suggestions in Android's settings.

The only solution from your application would be accesing Android's settings...if possible.,

No, no. You see - corrector want to change some text in TEdit - that's true - but the problem is, FireMonkey TEdit don't replace the text. TEdit is adding the text. That's make no sense. It's TEdit fault because the problem obviously does not affect edits created in other development platforms like Android Studio. So, the problem lays in TEdit itself. Maybe someone of you had similar problem and have some code to share? Some correction code of OnTyping event perhaps?
Ronald Klitsche

Posts: 326
Registered: 8/26/01
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 4:54 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Rick Oconnel wrote:
No, no. You see - corrector want to change some text in TEdit - that's true - but the problem is, FireMonkey TEdit don't replace the text. TEdit is adding the text. That's make no sense. It's TEdit fault because the problem obviously does not affect edits created in other development platforms like Android Studio. So, the problem lays in TEdit itself. Maybe someone of you had similar problem and have some code to share? Some correction code of OnTyping event perhaps?

There is/was some similar problems with Google Keyboard (GBoard) in
https://quality.embarcadero.com/browse/RSP-16935

This should be solved in 10.2.1.
Maybe not fixed all cases or new problems again in 10.2.2.
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 4:04 AM   in response to: Rick Oconnel in response to: Rick Oconnel
After some further testing the core issue is "Predictive Text" option of Samsung Keyboard -default on. Some kind of solution would be programtically switching that option off, and turning it on when app exits. Anyone knows how to accomplish that?

Or maybe someone knows how to force other input-type on TEdit. In Android Studio the solution is simple:

edittext.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

XML alternative that has worked:

android:inputType="textNoSuggestions|textVisiblePassword"

But as far as I know there is no way setting this in FireMonkey for TEdit...

Edited by: Rick Oconnel on Jan 10, 2018 4:07 AM

Edited by: Rick Oconnel on Jan 10, 2018 4:08 AM
Rick Oconnel

Posts: 8
Registered: 1/7/02
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 12:06 AM   in response to: Rick Oconnel in response to: Rick Oconnel
Thank you everyone for help. I found fully working solution for my problem. This topic can be closed now.

Solution is here: https://quality.embarcadero.com/browse/RSP-19742

Edited by: Rick Oconnel on Jan 11, 2018 12:15 AM
Jeremy North

Posts: 402
Registered: 9/20/99
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 2:57 PM   in response to: Rick Oconnel in response to: Rick Oconnel
Rick Oconnel wrote:
Thank you everyone for help. I found fully working solution for my problem. This topic can be closed now.

Solution is here: https://quality.embarcadero.com/browse/RSP-19742

Edited by: Rick Oconnel on Jan 11, 2018 12:15 AM

With your workaround what happens if the field is pre-populated with data? I assume you won't be able to read it so we need a full solution from EMBT.

They were supposed to have addressed this issue with the Tokyo release (or at least provide me with the promised hot fix for Berlin). Still waiting unfortunately...
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 3:10 PM   in response to: Jeremy North in response to: Jeremy North
Jeremy North wrote:

With your workaround what happens if the field is pre-populated with data?

It'd probably be more effective to somehow set Password to False before the user starts typing, but after the VK shows.

..we need a full solution from EMBT.

That's still true :-)

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Stefan Diestelm...

Posts: 19
Registered: 10/27/00
Re: TEdit nigtmare problem (Tokyo 10.2.2 and all below)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 14, 2018 11:17 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
Jeremy North wrote:

With your workaround what happens if the field is pre-populated with data?

It'd probably be more effective to somehow set Password to False before the user starts typing, but after the VK shows.

..we need a full solution from EMBT.

That's still true :-)

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Yes we need a simple option in TEdit to turn the Bahavior on / off
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02