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

Optimizing for tablet

Tablet is another emerging Android device in the present context. We should also define layouts to support tablet devices. To cater to tablet devices, or so called large devices, we need to have another set of layouts defined under the folder res/layout-xlarge (for the portrait mode) and layout-xlarge-land (for landscape mode).The following snapshot shows the folders and files for defining the layouts for larger devices (tablets):

Optimizing for tablet

Once we have created the corresponding folder, we can make use of fragments as demonstrated previously, to create different layouts and achieve the goal of supporting tablets.

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