Hi Bilbo, since Royale is more "agnostic" from a concrete runtime, is more oriented toward "beads", so you have :
BrowserResizeApplicationListener and BrowserResizeListener The first one can be added to the main Application, while the other is to be added to a concrete component. The second one has only JS implementation while SWF is still TODO But, if you focus on HTML/JS/CSS, you should take advantage of CSS responsive engine. So this is all mostly "outside" royale itself, and you need to learn the principles. Also, in Jewel and JewelTheme, you have responsiveness implemented, as you can see in Tour De Jewel [1] There you have CSS implemented breakpoints and also some beads to manage things like responsive layouts (Grid with GridLayout and GridCell with GridCellLayout), or beads for visibility (ResponsiveVisibility, ResponsiveSize,...) or a view for Application with that in mind (ResponsiveView), also components like Drawer, or TopAppBar are implemented with responsiveness in mind, and of course doesn't have a Flex correspondence since in Flex there wasn't that concept. In short, it's not recommended to use always listeners in Royale but depend on CSS built-in responsiveness and just use listeners to resize events when you really need it since with some AS3 script logic HTH Carlos El mié, 20 ene 2021 a las 21:27, Bilbosax (<[email protected]>) escribió: > Today is my first day using Royale. I am trying to migrate a mobile and > desktop app to the web, and I have a question about screen layout. I am > concerned about how to make the components lay out correctly across all > devices that might browse to the app. > > In the desktop version of the app, if the resize the window, I listen for > the Event.RESIZE event and I get the stage.stageWidth and > stage.stageHeight, > and then I manually set the layout of all my visual components based on > these two dimensions. > > Can you use this approach in a web app as well, or is there a better way? > > > > -- > Sent from: http://apache-royale-users.20374.n8.nabble.com/ > -- Carlos Rovira Apache Member & Apache Royale PMC *Apache Software Foundation* http://about.me/carlosrovira
