P postasat Active Member Licensed User Longtime User Sep 22, 2018 #1 Hi, how can I know when a layout is really loaded ? Is there an event raised for activity.loadlayout ? is it possible to wait till a layout is loaded ? Thank you.
Hi, how can I know when a layout is really loaded ? Is there an event raised for activity.loadlayout ? is it possible to wait till a layout is loaded ? Thank you.
Semen Matusovskiy Well-Known Member Licensed User Sep 22, 2018 #2 Which troubles do you have ? Typically universal tablet ( Sleep (0) ) helps. Upvote 0
P postasat Active Member Licensed User Longtime User Sep 22, 2018 #3 I have an error in "Activity_resume" when I set a label.text (java.lang.RuntimeException: Object should first be initialized (Label).). I think because layout it's still not loaded/ready. So I would like to know when activity layout is loaded. Thank you. Upvote 0
I have an error in "Activity_resume" when I set a label.text (java.lang.RuntimeException: Object should first be initialized (Label).). I think because layout it's still not loaded/ready. So I would like to know when activity layout is loaded. Thank you.
Semen Matusovskiy Well-Known Member Licensed User Sep 22, 2018 #4 No, the reason is exactly another. For example, really you don't load a layout or you give another name for label. Attach your code as zip. Upvote 0
No, the reason is exactly another. For example, really you don't load a layout or you give another name for label. Attach your code as zip.
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2018 #5 Semen Matusovskiy said: Typically universal tablet ( Sleep (0) ) helps. Click to expand... This is not needed when loading a layout. The layout is ready after the call to Activity.LoadLayout. Upvote 0
Semen Matusovskiy said: Typically universal tablet ( Sleep (0) ) helps. Click to expand... This is not needed when loading a layout. The layout is ready after the call to Activity.LoadLayout.
Semen Matusovskiy Well-Known Member Licensed User Sep 23, 2018 #6 Depends, what to name "ready". For example, LoadLayout does not redraw the screen immediately. From one side - this is a good feature (prevents flickering). But sometimes it's necessary to show a form immediately and to start long process. In this case Screen (0) will be usefull. Another sample - marquee labels. According my investigations jo.RunMethod ("setSelected", Array (True)) in modern API releases wants preceding Sleep (0). Of course, all this is not relative to postasat question. Upvote 0
Depends, what to name "ready". For example, LoadLayout does not redraw the screen immediately. From one side - this is a good feature (prevents flickering). But sometimes it's necessary to show a form immediately and to start long process. In this case Screen (0) will be usefull. Another sample - marquee labels. According my investigations jo.RunMethod ("setSelected", Array (True)) in modern API releases wants preceding Sleep (0). Of course, all this is not relative to postasat question.