04-12-2020, Saat: 12:32
Hello
why "Application.ProcessMessages" not work in Android?
why "Application.ProcessMessages" not work in Android?
|
Application.ProcessMessages in Android
|
|
04-12-2020, Saat: 12:32
Hello
why "Application.ProcessMessages" not work in Android?
ProcessMessages allows the jobs waiting in the queue to be temporarily transferred to the main thread by leaving the current thread.
I do not recommend using ProcessMessages in FMX Multi-platform architecture. Instead of ProcessMessages, write small subroutines. Synchronize or queue each subroutine in a new thread.
Begin : = end / 2;
04-12-2020, Saat: 13:18
(Son Düzenleme: 04-12-2020, Saat: 13:31, Düzenleyen: Mr.Developer.)
(04-12-2020, Saat: 12:57)RAD Coder Adlı Kullanıcıdan Alıntı: ProcessMessages allows the jobs waiting in the queue to be temporarily transferred to the main thread by leaving the current thread.Yes I khow but Embarcadero use it! See FMX.Ani class procedure TAnimator.AnimateIntWait(const Target: TFmxObject; const APropertyName: string; const NewValue: Integer; Duration: Single = 0.2; AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear); var Animation: TIntAnimation; begin StopPropertyAnimation(Target, APropertyName); Animation := TIntAnimation.Create(nil); try Animation.Parent := Target; Animation.AnimationType := AType; Animation.Interpolation := AInterpolation; Animation.Duration := Duration; Animation.PropertyName := APropertyName; Animation.StartFromCurrent := True; Animation.StopValue := NewValue; Animation.Start; while Animation.FRunning do begin Application.ProcessMessages; Sleep(0); end; finally Animation.DisposeOf; end; end; I use AnimateIntWait in project , in windows run correct but in android UI don`t response to user because use "Application.ProcessMessages;" Your comment was edited because it contains invalid code formatting. Please use code formatting in code shares!
04-12-2020, Saat: 14:01
(04-12-2020, Saat: 12:32)gbg Adlı Kullanıcıdan Alıntı: Hello Hi, You can find official answers on this topic here, unfortunately, for now you have to move forward with other solutions. Good work.
04-12-2020, Saat: 15:20
but "Application.ProcessMessages" work in Android with D10.2
04-12-2020, Saat: 17:04
You can use the following workaround with Delphi 10.4.
TThread.CreateAnonymousThread( procedure begin TAnimator.AnimateFloat(Arc1, 'EndAngle', 360, 1.3); TThread.Sleep(13 * 100); TAnimator.AnimateFloat(Arc1, 'EndAngle', 0, 1.3); end).Start;
Begin : = end / 2;
(04-12-2020, Saat: 17:04)RAD Coder Adlı Kullanıcıdan Alıntı: You can use the following workaround with Delphi 10.4. Thanks But I need to wait in the main thread I have a CriticalSection and I want the main thread to wait for the end |
|
« Önceki Konu | Sonraki Konu »
|
| Konu ile Alakalı Benzer Konular | |||||
| Konular | Yazar | Yorumlar | Okunma | Son Yorum | |
| Android Uygulama İkonu | ARM | 2 | 400 |
11-11-2025, Saat: 12:15 Son Yorum: ARM |
|
| Android SDK | kajmerantime | 1 | 385 |
28-10-2025, Saat: 14:53 Son Yorum: cinarbil |
|
| Android El Terminali Barkod Okuyucu Verisi | tuna | 0 | 334 |
17-10-2025, Saat: 01:07 Son Yorum: tuna |
|
| Android işlem öneriliyor uyarısı! | Coban | 9 | 1.864 |
07-08-2025, Saat: 12:07 Son Yorum: RAD Coder |
|
| FMX Android Adaptive Icons kullanabilir miyiz? | egeven | 1 | 2.157 |
30-06-2025, Saat: 21:46 Son Yorum: emozgun |
|