Jump to content
Sign in to follow this  
Clayton A. Alves

Slow response on TButton click

Recommended Posts

I've made a virtual number keyboard using fmx.

Each key is a TButton, inside a TGridLayout. Each TButton updates a TEdit with the corresponding number (from Text property).

 

When I run the application on Android 14, it works ok.

When I run this application on Android (8.1.0 Oreo), on a real device, the time from the touch to the response (updating the TEdit) is really slow.

 

If I place the buttons outside the TGridLayout, the performance get's a little better.

If I replace the TButtons to TRectangles with TText, the performance get's even better.

 

Is there any property or configuration that I can set to make the TButton version respond faster ?

 

Maybe the issue is related to the animation when the button is clicked, but I can't find a way to turn it off.

 

Below is an image of the app running.

 

image.thumb.png.cc090347d19d6eb3c61589bdfcb9f44f.png

 

This is the device i'm testing:

 

https://www.jarltech.com/sites/default/files/images/product/main/SUN_d2_mini_front_web.png

Edited by Clayton A. Alves

Share this post


Link to post
5 hours ago, Clayton A. Alves said:

Is there any property or configuration that I can set to make the TButton version respond faster ?

It might help to indicate which version of Delphi. I have similar code that as far as I can remember worked OK on (real) devices with Android 8 or lower (using Delphi 12), however I no longer have access to them.

 

It might also help to create a reproducible test case, in case someone else has such a device. I could try it out on an emulator, though.

Share this post


Link to post
On 12/27/2024 at 10:24 PM, Clayton A. Alves said:

I've attached the sample test project I'm using.

I've tested the same project using Delphi 12.2, deploying to an emulator running Android 8.1 (which is what the Sunmi D2 Mini shipped with), and all respond with the same speed.

 

Perhaps someone with a real device might be able to confirm?

  • Like 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  

×