How to initialize app on first run?

Greetings,

I am creating an app for a class routine. I have about 70 horizontal arrangements, all of which need to have the exact same properties. Since it is not possible to copy horizontal arrangement, I was hoping to do it via blocks. But I don't want the app to resize my hor_arr blocks every time the app is run.

Now my question is, is there a way to do certain things so that it will only work on the first run, and stay that way?

A pseudocode for what I want to attempt is:

Boolean firstRun;

Check in phone locations for a file containing the firstRun condition.

if (firstRun_LocationInPhone is false){
  doNothing;
} else {
  foreach (hor_Arr){
    setUpArrangementSizeAndOtherProperties
  }    
  set value of firstRun_LocationInPhone to false;
}

Let me know if this is how I should approach my problem, or if there is a better/simpler way.

Try this:

grafik

you might get problems while building your app if you use "too much of something" (by @Boban)...

let me suggest you to try the following extension, which let's you add arrangements dynamically

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

3 Likes

Thank you very much guys. I will look into your advice.

The dynamic components extension looks good. I did not know it existed. I will give that a try.