O'Reilly logo

Hello, Android, 4th Edition by Ed Burnette

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

All Screens Great and Small

Supporting different screen sizes, resolutions, and pixel densities is important because you want your application to look its best on as many Android devices as possible. Android will try to scale your user interface to fit the device, but it doesn’t always do a great job of it. The only way to tell is through, you guessed it, testing. Use the emulator types recommended in Gentlemen, Start Your Emulators to make sure your program works on the most common sizes.

As a test, try running the Tic-Tac-Toe program in the Nexus 9 emulator. You’ll find that the menu on the main activity and the board in the game activity look too small. That’s because all the sizes are specified in dps, but the tablet has a much larger ...

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