Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to declare the layout for 7'inch tablet Android?

Tags:

I am developing application on both 10'inch&7'inch tablets, here is my problem for 10'inch tablet i have declared layout as(layout-xlarge-land & layout-xlarge-port),while coming to 7'inch i have declared layout as(layout-sw600dp-land&layout-sw600dp-port)?

while coming to 7'inch tablet it's not working for me,The Tablet which i am using is (iRobot).

like image 389
NikhilReddy Avatar asked Oct 14 '11 04:10

NikhilReddy


People also ask

How wide is a 7 inch tablet?

Samsung Galaxy Tablet Specs The 7-inch (17.8-centimeter) Samsung Galaxy Tablet has the following specifications: Dimensions (W x H x D) -- 4.74 x 7.48 x 0.47 inches (12.04 x 19.0 x 1.19 centimeters)


2 Answers

In the rare case where you want to further customize your UI, For example for 7” vs. 10” tablets, you can also define smallest widths:

res/layout/main_activity.xml           # For phones res/layout-sw600dp/main_activity.xml   # For 7” tablets res/layout-sw720dp/main_activity.xml   # For 10” tablets 

and just check out this for 7” vs. 10” tablets:--

New Tools For Managing Screen Sizes.

like image 52
Uttam Avatar answered Sep 29 '22 10:09

Uttam


you can also specify your layout folder like this

  1. layout-1280x800
  2. layout-port-1280x800

As per new approach discussed here, New Tools For Managing Screen Sizes
we can specify like this

  1. layout For phones
  2. layout-sw600dp # For 7” tablets
  3. layout-sw720dp # For 10” tablets
like image 41
Labeeb Panampullan Avatar answered Sep 29 '22 10:09

Labeeb Panampullan