![]() |
DPFActivityIndicator zur Laufzeit erzeugen
Hallo,
ich habe ein Problem, und zwar: meine App soll auf iOS als auch auf Windows laufen (was ja seid Franks Idee stylisch wunderbar funktioniert). Nur funtkioniert das nicht, sobald ich die nativen iOS-Controls benutze (logisch). Deshalb habe ich vor, den DPFActivityIndicator nur zu erstellen, wenn die App auf iOS läuft. Das habe ich mal folgenderweise gemacht:
Delphi-Quellcode:
Nur funktioniert das nicht, also das Fenster wird nicht angezeigt. Auch ein BringToFront bewirkt nichts.
{$IFDEF IOS}
ActivityIndicator1:= TDPFActivityIndicatorView.Create(F_Main); ActivityIndicator1.Align:= TAlignLayout.alCenter; ActivityIndicator1.Width:= 110; ActivityIndicator1.Height:= 110; ActivityIndicator1.BackgroundColor:= TAlphaColors.Black; ActivityIndicator1.Color:= TAlphaColors.blue; ActivityIndicator1.Alpha:= 0.8; DPFLabel1:= TDPFLabel(ActivityIndicator1); DPFLabel1.Align:= TAlignLayout.alMostBottom; DPFLabel1.Position.Y:= 66; DPFLabel1.Width:= 110; DPFLabel1.Height= 34; DPFLabel1.Text:= 'Laden...'; DPFLabel1.TextColor:= TAlphaColors.White; DPFLabel1.TextAlignment:= TDPFTextAlignment.taCenter; ActivityIndicator1.StartAnimating; {$ENDIF} Irgendwelche Idee? Viele Grüße Croco |
AW: DPFActivityIndicator zur Laufzeit erzeugen
M.E. fehlt hier jeweils die Angabe des Parents
|
AW: DPFActivityIndicator zur Laufzeit erzeugen
Bringt leider nichts :|
Delphi-Quellcode:
ActivityIndicator1:= TDPFActivityIndicatorView.Create(Form1);
ActivityIndicator1.Parent:= Form1; ActivityIndicator1.Align:= TAlignLayout.alCenter; ActivityIndicator1.Width:= 110; ActivityIndicator1.Height:= 110; ActivityIndicator1.BackgroundColor:= TAlphaColors.Black; ActivityIndicator1.Color:= TAlphaColors.blue; ActivityIndicator1.Alpha:= 0.800000011920929000; DPFLabel1:= TDPFLabel.Create(ActivityIndicator1); DPFLabel1.Parent:= ActivityIndicator1; DPFLabel1.Align:= TAlignLayout.alMostBottom; DPFLabel1.Position.Y:= 66; DPFLabel1.Width:= 110; DPFLabel1.Height:= 34; DPFLabel1.Text:= 'Laden...'; DPFLabel1.TextColor:= TAlphaColors.White; DPFLabel1.TextAlignment:= TDPFTextAlignment.taCenter; ActivityIndicator1.BringToFront; ActivityIndicator1.StartAnimating; |
AW: DPFActivityIndicator zur Laufzeit erzeugen
Code:
ActivityIndicator1:= TDPFActivityIndicatorView.Create(Form1);
// Ist Form1 unter iOS von UIView abgeleitet? // Dann sollte es so etwas in der Art geben .. Form1.AddSubView(ActivityIndicator1); // oder (Form1 as UIView).AddSubView(ActivityIndicator1); // dann weiter ... ActivityIndicator1.Align:= TAlignLayout.alCenter; ActivityIndicator1.Width:= 110; ActivityIndicator1.Height:= 110; ActivityIndicator1.BackgroundColor:= TAlphaColors.Black; ActivityIndicator1.Color:= TAlphaColors.blue; ActivityIndicator1.Alpha:= 0.800000011920929000; ... ... ActivityIndicator1.StartAnimating; |
AW: DPFActivityIndicator zur Laufzeit erzeugen
Mhm, also UIView und ActivityIndicator1 sind inkompatible Typen.
|
AW: DPFActivityIndicator zur Laufzeit erzeugen
Zitat:
![]() Bin dann raus ... |
AW: DPFActivityIndicator zur Laufzeit erzeugen
Hat vielleicht noch jemand eine Idee?
|
AW: DPFActivityIndicator zur Laufzeit erzeugen
Poste dein Problem mal in SourceForge? Babak nimmt sich eigentlich immer die Zeit diese probleme anzuschauen bzw. zu beheben.
Ich hatte mit alCenter auch Probleme. alContent hat bei mir geholfen |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz