问题
In my application I have designed layouts for resolution 600x1024 and placed them in the layout-large
folder.
When I run the app on Samsung Galaxy Tab it picks up layouts from the layout-large
folder and the UI looks fine.
But for Samsung Note too it picks up layouts from the layout-large
folder and the UI does not look good.
Is there any way I can create an exceptional case for Samsung Note, and tell android not to use layouts from layout-large folder if the device is Samsung Note and instead use layouts from some other folder for this particular device???
I have also designed layouts for resolution 800x1280 and placed them in the layout-xlarge
folder. But even though Samsung Note has resolution 800x1280 it does not use layouts from this folder!!
I came across new size qualifiers here http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts but could not use this approach as my application's minimum sdk version is 2.3 (API level 9)
I have to support Samsung Note for my application and need a solution for this on priority, please help... Thanks in advance!
回答1:
//check your density of your phone and create an layout and place your xml file there.
for medium density which is 160dpi
res/layout-large-mdpi
for high density which is 240dpi
res/layout-large-hdpi
for xhigh density which is 320dpi
res/layout-large-xhdpi
回答2:
Yes. you can create a special folder for samsung galaxy note as following:
res/drawable-sw800dp
which means smallest width is 800 dp. So gaalxy note falls in this category, but your 1024*600 tablet does not.
来源:https://stackoverflow.com/questions/10751343/samsung-note-layout-issues