Tuesday, July 16, 2013

How to prepare layout,drawable folders for 7",10" android tablets for both landscape and portrait?

You are naming the folders in the wrong way. In Android, there is a rule or order in which you name your resource folders. You should provide your qualifier names in that order.

Check this documentation table on providing resources. Your should name your folders in the order provided in the table.(Its better if you read the whole page, because it'll give you a better understanding in providing resources)

Here you should name the folders as

layout-large-port-hdpi drawable-large-port-hdpi 

For preparing the resource folders for tablets, you can use either the screen size attribute or shortest width attribute.

For e.g

If you use screen size attribute, you can name folders like

layout-large-... (for 7" devices) layout-xlarge-... (for 10" devices) 

I you use shortest width attribute, you can use

layout-sw600dp-... (for 7" devices) layout-sw720dp-... (for 10" devices) 

Remember shortest width attribute works only on devices from 3.2 (API 13).

Source: http://stackoverflow.com/questions/17647507/how-to-prepare-layout-drawable-folders-for-7-10-android-tablets-for-both-lands

Bruins score State of Decay michelle obama ryan braun florida lottery Cassadee Pope MLB Draft 2013

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.