For the More Curious: More on Determining Device Size
Android provides three qualifiers that allow you to test for the dimensions of the device. Table 17.1 shows these new qualifiers.
Table 17.1 Discrete screen dimension qualifiers
||available width: width greater than or equal to XXX dp|
||available height: height greater than or equal to XXX dp|
||smallest width: width or height (whichever is smaller) greater than or equal to XXX dp|
Let’s say that you wanted to specify a layout that would only be used if the display were at least 300dp wide. In that case, you could use an available width qualifier and put your layout file in res/layout-w300dp (the “w” is for ...