Unknown screen height change

Hi everybody, I'm asking for your help with this issue:

I've a 3 buttons screen, to handle game players in the app: you can Add, delete or modify them.
everything works fine, previous to google full screen size change, and, so far, I only have observed this behavior in Samsung devices; in other brands works fine.

What happened is that when you pick the new button, and add a new player, you go back to players menu, and for some reason I can't figure it out, decreases screen height. Same ocurrs with modify button.

If you pick delete button and erase a player, when you go back to players menu, the screen height is correct. If you pick any button and made no changes, and only press the back button, nothing changes and the screen height remains correct.

I added a tag with screen height to point out what change in.

I'm attaching a video to show this behavior, and the aia project, for further reference.

I hope someone can help me to see what I'm doing wrong.
Regards.


ScreenChanges.aia (73.5 KB)

Had a look at your aia, found a missing variable declaration on Menu Principal, and incorrect switch screen blocks on New (after setting a new user)

Don't know if this makes any difference ?

Screen size should be immutable, it is set by AppInventor when the screen initialises.

Make certain that you ALWAYS close out your project when on Screen1. (current lastopened bug)

ScreenChanges (1).aia (73.9 KB)

You might want to create a simple test app that demonstrates this behaviour?

@TIMAI2, thank you for your response.

This project belongs to an app that I have in the Playstore since 2016, and I left only the significant blocks to show what is happening with the screen height, so I apologize by the mistakes you correctly pointed out.

In the other hand, same app in a realme device, with limited screen area to the camera, have no problem with screen height. Example attached.

I think the problem is with the full scren size which includes the camera notch, because is the only recent change I can see, with the design on the devices.

Regards

Android version(s)? Device name?

Thank you @Anke, is a Samsung SM-A556E, Android versión 16, in which I'm testing.

But It happens the same in a friend's Samsung S21 (don't know the Android versión), which has installed the App from the Playstore.

Yes, I was able to reproduce the problem on my Pixel 7 Pro (Android 16). There seems to be a mysterious bug (after switching back from Screen "New" to "Jugadores") because ScreenHeight is returned incorrectly, and therefore the percentage values ​​are calculated based on a significantly smaller ScreenHeight.

Try this
ScreenChanges_2.aia (80.8 KB)

Thank you @Anke, I'll try It asap.

Regards

Use another button and reload the screen, like this:

grafik

I did something similar in my modified aia (that does it automatically).

Thank you @Anke, I'll check it.

Regards

Since the app in the Playstore has not been updated in this modules, and now I have a better comprehension of how AI2 works, specially with screens, since I created it in 2016, I'm updating the app so there's no need to change screens to add/delete/modifiy players, and with this change there no longer problem for me, so I'm going to close the topic.

However, the bug remains there, so I hope this had helped to visualize it, and to find a future solution.

@TIMAI2 and @Anke, thank you for your comments.

Regards.

So you've switched everything to virtual screens?

It's correct, works fine, and I uploaded the App to Playstore last nigth.

Libreta de Dominadas: App in Playstore

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.