O'Reilly logo

Android Development Tools for Eclipse by Sanjay Shah, Khirulnizam Abd Rahman

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

Chapter 6. Handling Multiple Screen Types

Android devices are available in different shapes and sizes. For a wider audience, handling multiple screen types across different devices is the key. In this chapter we will learn about catering to different screen orientation changes and different screen types. We will make use of the DistanceConverter application discussed earlier, and make changes to cater to different concepts needed to achieve this:

  • Adapting to different screens using wrap_content and match_parent
  • Introducing Fragment
  • Defining Fragment and Landscape layout
  • Hook up in the Main Layout file
  • Running the application
  • Optimizing for tablet
  • Persisting the state information during the state transition

Tip

We will use the DistanceConverter application ...

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