Jump to content
Jean_D

Delphi 12 - TEdit: Android App Strange Behavior

Recommended Posts

We have an app for Android (originally created using the Delphi 11 but, now, maintained using Delphi 12). After a fresh install, the login process will behave properly. However, after logging out, any attempt to log back in will have the 'caret' not aligned with the 'cursor' (see below). By the way, both the username and pin are TEdit. How do I force the 'caret' to be aligned with the 'cursor?'
 

1249962580_Screenshot_20240110-160521-Clean.thumb.jpg.cab0638ae88c924d3aa208018571e66e.jpg

 

Then, once in a while, if we tap the username field in order to enter a new value, we get the following error:

 804556882_Screenshot_20240110-163939-Clean.thumb.jpg.af5f482a192e9ae2205485bd21e27c27.jpg

 

Has anybody else experienced this strange behavior/error and found a way to solve it? By the way, none of these issues were present under Delphi 11.

Share this post


Link to post

Thanks for the link. It appears to be promising. I was able to 'patch' the 'FMX.Platform.UI.Android.pas' file. If I replace the original file with its patched version, how do I 'force' the recreation of its '.dcu' counterparts?

Share this post


Link to post

Copy your patched FMX.Platform.UI.Android.pas to the same folder containing your project. You could also add it to the project. Delphi will compile and use the one in your project folder rather than the version shipped with Delphi.

 

If you need to use this for multiple projects, or later need to patch another FMX unit, you could create a folder named something like FMXOverrides. I don't use FMX but I've had a VCLOverrides folder for years. :classic_wink:

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

×