Blank screen after switching screens

If I had to guess, I would say that there is something wrong happening with the BMI formula calculation. In my opinion this is somehow messing up with the project. A friend of mine did a similar project but with the formula result showing up in the same screen in which you input your data and it worked propperly (he is also using IOS).

Try it

CALCULADOR_IMC_1.aia (74.9 KB)

Your images should also be sized to match the size of the buttons.

Leo, in Screen3 you are using a Table Arrangement, for which unfortunately there are occasions when file corruption is caused.

Delete Screen3, create a new Screen3, arrange the GUI again using Horizontal and Vertical Arrangements.

See my edit below for Screen1 and 2. Screen3 should be called and closed in the same way Screen2 is.

Note the safety check - are there values in INSERIR_ALTURA and INSERIR_PESO.

Note also that to use Textboxes for numbers, the Properties palette option "Numbers Only" should be ticked.

Finally, button USUARIO could not be seen on my phone, it was off screen, so I reduced the height of it's Arrangement and made the screen scrollable.

CALCULADOR_IMC_Edit2.aia (73.9 KB)

Thank you for your feedback. I tried using your file and it worked once, but then it suddenly stopped working. Also, if the values for height(=altura) and weight (=peso) are empty, Screen2 loads propperly. That is wwhy I think the formula is messing up the loading of the screen.

That is another App-Killer issue Leo. Your images are far too large. Read this:
ProfessorCad: Tips & Tricks Images

Hmm - this post is similar to:

Thank you for your feedback. This is the updated version of the project:
CALCULADOR_IMC (2).aia (74.8 KB)
I understand that the design/coding of Screen3 is far from optimal but it is loading propperly now. My only issue is when I insert the values and try to load Screen2. As I mentioned, only a blank screen shows up.
Also, I noticed that I should tick the only numbers box but, by doing so, I can only insert numbers with "," and not "." which also causes troubleshooting (the BMI formula won't work then).

The blank screen problem arises because on the first screen you open screen2 and close screen1. You only have screen2 open. On screen two, you close screen1, but you don't open any screens, so you have no screens. Try the aia from Chris because he corrected it there.

I tried his version but still no luck. I get what you are saying, but the ideia is to click on the arrow to reopen Screen1, so I do not know if this would be an issue at all.

Try it:
CALCULADOR_IMC_1 (1).aia (75.1 KB)

If that doesn't work, we'll try not to close screen1

And write if you have a problem with manually switching screens in this version.

Still no luck. Also going back from Screen3 to Screen1 by clicking the "arrow" button is now causing the app to crash somehow (only in the project you sent me though).
Also tried not closing Screen1, and it keeps showing a blank screen.

Last try. I don't have an iPhone so I can't help much.
CALCULADOR_IMC_1_copy.aia (74.7 KB)

What else comes to mind is remove the image component and don't display the image on the screens.

It still won't work. Thanks a lot for the effort and time spent trying to help me though and sorry to waste your time with this.

Also try removing the image component from your screens.

Yes, because with Companion there is only one screen, so you can't close Screen2 or Screen3 without opening Screen1 again. This also does not work with Android.

I'll take a closer look at your app tomorrow.

1 Like

Projects are inserted above that do not close screen 1. They also do not work according to the author of the post.
I have an android project with only 1 screen open. There is also a project that has 2 screens open at the same time.

But not with Companion.

I have no problem with that.
2 screens:
CALCULADOR_IMC_2_copy.aia (74.7 KB)
1 screen:
CALCULADOR_IMC_1_copy.aia (75.0 KB)

They both work the same for me on companion. None of them work for the author of the topic.

1 Like

Yes, with the compiled app (APK), but not with Companion.

With companion. On Android. The logic of both aia above works the same. Screen2 is displayed after clicking on calculate. For me, I can switch screens manually in the designer using the screen selection button, but the author gets an error at this point. But in my example aia which is somewhere above "start value" screen2 switches without problems.