While we have designed our GameView
to scale equally in all screen sizes and aspect ratios by making use of the appropriate screen units, Android views do not work this way; however, we can follow the standard Android procedures for them.
For apps, it is recommended that you tweak the layout based on the screen size. For games it makes sense to keep the same layout across all screen sizes and only vary the size and margins of some items.
As a rule of thumb, you should always use RelativeLayout
to design your layouts, where every item on the screen is positioned relative to something else. This allows the layout to adapt smoothly to all screen sizes. This concept is at the core of responsive design.
To have a proper display in all screen sizes, we are going to qualify the dimensions; this is included on the Android SDK and is recommended practice.