How do you properly resize components on Orientation change?

I have a button in a Horizontal Arrangement.
It's width is defined as a percentage of it 's parent (that is of the Horizontal Arrangement).

I have this code in the Orientation changed event:

εικόνα

But it does not resize correctly.
I suppose that this is because, when the code is executed, the Horizontal Arrangement has not yet been resized (ot the button 's width hasn't yet changed).
Is there some solution to this?
Inventory_1_7_test_1.aia (6.7 KB)

Use a clock timer after orientation changes. ai2 needs a little bit of time to catch up with new screen sizes.

1 Like

Try this one (without a Clock component):
Inventory_1_7_test_2.aia (8.2 KB)

and customize it to your liking.

2 Likes

It looks like working!

εικόνα

Inventory_1_7_test_3.aia (7.2 KB)

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