Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between layout large and land for tablets?

I have a doubt in android.I am using layout-land for the landscape view and layout-large for the tablets,when I am using tablets which layout will be taken by the android system, layout-land or large? In what basis it will take the layout.Please explain.

Thanks.

like image 287
AndroidCrazy Avatar asked Dec 27 '22 12:12

AndroidCrazy


2 Answers

If you have provided resources for large and for land (with the same resource ID) the large will have precedence over land. That means on a tablet you will always get the large resources independent of orientation.

If you need separate resources for landscape on the tablet you can use the qualifier large-land

Details can be found in the android developer docu

like image 30
Henry Avatar answered Dec 29 '22 01:12

Henry


Have a look here.

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

As per the screen size,your layout is choosen. Here all the my_layout.xml files resides in all layout folder. The perfect layout is choosen by the screen size.

For more info visit to:

http://developer.android.com/guide/practices/screens_support.html

like image 140
Narendra Pal Avatar answered Dec 29 '22 02:12

Narendra Pal