by GBKS · 12y ago · 0 comments
They split phone sizes (2-10") into four generalized sizes (small, normal, large, xlarge). Then they split screen density into generalized densities (ldpi, mdpi, hdpi, xhdpi) based on 3:4:6:8 ratios. The example on the page lists 5 different layout XML files (the 4 previously mentioned + extra large landscape orientation) for different sizes, and three folders for image assets in different densities.
But, there are tablet layouts for Android 3.2+, which use a completely different system based on size qualifiers where you can provide minimum/maximum pixel sizes for layouts.
The logic for iOS seems super simple in comparison.
With a few Android projects under your belt, you have probably internalized how everything works, and which parts are fringe cases you can ignore. But if you're new to this (or a journalist/analyst with limited technical depth), it seems like an absolute mess. Simply rewriting this documentation and providing better tutorials and resources could go very far to clarify the situation.
Also, even if you are supporting 2.x, you don't HAVE to have a separate layout file for each generalized size. If you make a flexible layout that works on all sizes, you can just declare it once (and doing so is not difficult in most cases).
I totally agree the documentation needs work. Some areas have not been updated in a very long time.