Reputation: 1371
I am prepared one application in 4.0.3. My application support to all resolutions for that i have prepared different layout like,
layout-hdpi
layout-land-hdpi
layout-large-port
layout-large-land
layout-xlarge-port
layout-xlarge-land
when i have run my application in 1024x600 with 240 density it is taking layout-hdpi file and when i run the application in 1280x800 with 160 density it is taking layout-large file.Please tell me how to over come this problem. please help.
Upvotes: 0
Views: 450
Reputation: 10203
With your specifiers, you can filter a device either by their density (ie: pixels per inch) using ldpi, mdpi, hdpi, xhdpi, or by the actual screen size (small, large, xlarge), as specified in the documentation. As stated recently, you can also provide a resource by the minimum resolution (aka smallest width : sw600dp) qualifier.
As per [the documentation], if you give multiple qualifier, you must give them in a specific order.
Finally, when you ask for a resource, Android tries to find the best match, first by eliminating the resources which don't apply to the current device, evaluating one qualifier after the other in the order defined earlier.
Upvotes: 0
Reputation: 17932
You can use the modifiers for tablets. This allows usage of folders like "layout-sw600dp" or "layout-w1024dp". Create folders with this format and place your resources in the corresponding folder.
Upvotes: 2