What is the best way to create applications in Flex/AIR, which look and feel the same irrespective of the screen resolution?
相关问题
- How to create PNG images with more than 72dpi usin
- Phonegap not scaling properly between iPad and iPh
- Android browser reporting the wrong screen size?
- Set resolution manually in Java Swing
- How to set auto layout constraint on imageView for
相关文章
- Android - Google Play filtering out xxhdpi
- Issue setting Kivy to fullscreen
- Programmatically trigger “detect displays.”
- Detect all available scanner resolutions using WIA
- set image size with respect to the screen resoluti
- How can I crop image without changing its resoluti
- How to find the max image size supported for conta
- Programmatically change resolution OS X
When creating the layout in your flex application, you can achieve a consistent screen resolution independent look and feel from using relative scaling.
This is much akin to creating a liquid layout with HTML.
For example, to create a simple two column application— left navigation and content— you only need two containers, one predefined and one left to scale indefinitely.
As follows:
Using the above basics you can create a application layout that forms to any screen.
However, sometimes you need to create a more elaborate layout scheme with many interchanging components resizing dynamically to fit the window.
For this you can do Absolute Positioning. override the components updateDisplayList() function and create your own sizing/positioning rules.
This of course requires you to be within a Canvas container or have the main Application container set to absolute layout.
A simple example:
By overriding updateDisplayList() you can create endless ways to better dynamically position and size your components to better use the screen realestate.
We typically create a MainFrame.mxml which acts as our primary component and has layout relative scaling as mentioned by the others. Then we create the AIR app which just embeds that one MainFrame.mxml and another Flex app that embeds it as well. This way we can keep the entire app within MainFrame and not worry about if it is in Flex or Air. This being said you will need to make sure you do not use any AIR specific or Flex specific calls that do not translate to the other.
You can create a application with height and width respective to the container so that way all components will aling themself properly at all screen resolutions.