Hello appinventor community! First time posting here, so be kind with me.
I'm making mock apps with appinventor2 just to learn and I've come to a dead end.
I'm having a one Screen app I'm working on, where there is a TableArrangement with 6 clickable images as buttons, named "btn_Menu". I'm testing my code on Ai Companion and through USB, with two differnt Android devices running 4.2, & 5.0 and I'm getting differences in app loading times. Therefore I need to implement a loading screen through the use of "visible/invisible" VerticalArrangement, with a rotating "loading_Icon" image.
What I've done sofar is, check in an "if...then...else" block, the "btn_Menu.Visible", adding a clock.Timer enabled to 5000ms in "then" adding a "set loading_Icon.Visible = true" and "set loading_Icon.RotationAngle to loading_Icon.RotationAngle+200".
The problem is, that either the clock does not fire, or there is no code checking done in "if".
Is my thinking right, on checking the visibility of the TableArrangement to know if it has loaded, and then loading the "loading_Icon", only at timer, or there is another way to check if an arrangement of buttons has loaded in an app?
Any suggestions, preferably with a block sample, is very mutch welcomed.
no, if you set the arrangement to true from the beginning, then it will be true whether the images are loaded or not...
Let me suggest you to test after building the app... do you have the same issues there?
how large, i.e. width and height in px are the images?
Hello @Taifun, I have already tested running times after building app, on both devices. The fact is that those devices are not comperable in hardware specs, and this is why I’m testing on both of them.
The images I’m using are 512px native, but in appinventor desiner, I’ve set them at 10x10 percent height x width, aproximately at 60x30px.
I would really like to learn how to make a loading rotating icon in appinventor, if it is possible to get to know when an arrangement has been loaded.
You had made Taifun, an example on checking when a webviewer page has loaded, sometime ago. I need something similar, bat for graphic elelements.
Then write some html, load the buttons with images there to a webviewer, then you can use the web page loaded event.
Use javascript to activate the webviewstring event in the app for the button clicks.
or pick your worst case scenario in terms of loading time, and use that value in your clock timer for ending the loading screen.
As Taifun has already indicated, there is no method for confirming that a component arrangement has loaded.
Your images are @ 10 times too big. If the display image is going to be 60x30px, then make your images 60x30px, this will load much faster.