Jump to content
CarloM

ActivityDialog on Android

Recommended Posts

hello,

 

I have using FGX components on Android successly, but since RAD Tokyo native activity dialog does not work.

 

Any suggestion ?

Share this post


Link to post

Yes, I refer to FMX version.

 

Activity dialog does not show on Android

Share this post


Link to post
fgActivityDialog.Show;
    
      
        if FormSelector <> nil then
          FormSelector.Free;

        FormSelector := nil;

        Application.CreateForm(TFormSelector, FormSelector);
        //FormSelector := TFormSelector.Create(self);
        FormSelector.sClass := pSL.Values['Class'];
        FormSelector.sFromValue := pSL.Values['KeyFrom'];
        FormSelector.Field := Field;

        FormSelector.FCurrentFrame := TFrameList(TFrameClass(FindClass(FormSelector.sClass)).Create(FormSelector));
        FormSelector.FCurrentFrame.Name := 'FrameSelector';
        FormSelector.FCurrentFrame.Align:=TAlignLayout.alClient;
        FormSelector.FCurrentFrame.Parent:= FormSelector.Panel;
        FormSelector.FCurrentFrame.TagFloat := 1;

FormSelector.Show;
fgActivityDialog.Hide;

It works on version prior to Tokyo.

Now, activitydialog not shown

Share this post


Link to post

I have same problem,

 

FGX components dead after tokyo 😞

Probably answer is "Threads" but its complicated.

 

My temp solution is timers

its not good but working. (timer interval need to >501 (half sec) )

procedure TForm1.Button1Click(Sender: TObject);
begin
  fgActivityDialog1.Message := 'Teste';
  fgActivityDialog1.Show;
  Timer.Interval:=501;
  Timer.Enabled:=True;
end;

procedure TForm1.TimerTimer(Sender: TObject);
begin
  Timer.Enabled:=False;  
  //DO YOUR JOBS HERE
  fgActivityDialog1.Hide;
end;

 

For more, official FGX components forum (russians) (they have same question like you)

http://fire-monkey.ru/topic/4123-поведение-fgactivitydialog-в-токио/

http://fire-monkey.ru/topic/4670-fgactivitydialog/

http://fire-monkey.ru/topic/5630-fgx-for-tokyo-delphi-1021-please/

 

 

 

 

 

Share this post


Link to post

If I use timers fgActivityDialog1 freezes when executing the corresponding code, aniindicator is paused

Share this post


Link to post
40 minutes ago, CarloM said:

If I use timers fgActivityDialog1 freezes when executing the corresponding code, aniindicator is paused

Yes aniindicator freeze but at least showing loading screen, other way full application freeze 

its not perfect but acceptable

 

if any one have better solution (without threads) it will be good, I need too 

Share this post


Link to post
11 hours ago, pieomy said:

FGX components dead after tokyo 😞

Between then and now? Yes. Entirely dead? No.

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

×