Skip to content

Commit 87ebfb3

Browse files
committed
Fixed TFMXLoadingIndicator. When change the Visible property to false, stop the animation, when the property is true start the animation.
1 parent 3730650 commit 87ebfb3

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@
4141
/Demo/PhotoCorrect/__history
4242
/Demo/PhotoCorrect/PhotoCorrect.res
4343
/Demo/TestBezierAnimation/TestBezierAnimation.res
44+
/__history

ComponentsSource/FMX.LoadingIndicator.pas

+10
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ TCell = record
104104
protected
105105
procedure Resize; override;
106106
procedure Paint; override;
107+
procedure SetVisible(const Value: Boolean); override;
107108
public
108109
constructor Create(AOwner: TComponent); override;
109110
destructor Destroy; override;
@@ -279,6 +280,15 @@ procedure TFMXLoadingIndicator.SetKind(const Value: TLoadingIndicatorKind);
279280
end;
280281
end;
281282

283+
procedure TFMXLoadingIndicator.SetVisible(const Value: Boolean);
284+
begin
285+
inherited;
286+
if Value then
287+
FAnimation.Start
288+
else
289+
FAnimation.StopAtCurrent;
290+
end;
291+
282292
procedure TFMXLoadingIndicator.Start;
283293
begin
284294
CreateAnimation;

HISTORY.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 2017-11-22
2+
3+
Fixed TFMXLoadingIndicator. When change the Visible property to false, stop the animation, when the property is true start the animation.
4+

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,7 @@ TFMXToast is a toast component using pure fmx<br>
180180
A QRCode display component<br>
181181
use DelphiZXingQRCode to generate QRCode image<br>
182182

183+
## License
184+
185+
The FMXComponents is open-sourced software licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
183186

0 commit comments

Comments
 (0)