O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scale and platform

Generalized qualifiers such as those discussed earlier are very useful, suit most purposes, and save us a lot of time. However, there are times when we want more exact information about the device our app is running on.

One of the most important features we want to have information about is screen size. We have already encountered qualifiers such as small, normal, and large, but we can also configure for more precise dimensions. The simplest of these is the available width and available height. For example, layouts in res/layout/w720dp will only inflate when there is a minimum of 720dp available and height and res/layout/h1024dp will inflate when the screen height is equal to or greater than 1024dp.

Another very handy feature ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required