In my case, none of them worked. So, for the desktop version, I did an ugly thing: duplicated the aspectRatio
property over the others, after the title
property. I donβt know if a property matters, but it was.
There is only one problem with this approach: when creating a debug version of your application, everything works fine (including on a mobile phone), but when creating a release version, an error occurs indicating that the aspectRation
property is unexpected. Just delete one of them and the assembly will work.
Just to register, to make it work on a mobile phone, I also had to set the aspectRatio
property in the code:
stage.setAspectRatio(StageAspectRatio.LANDSCAPE);
source share