Samsung Note layout issues

自作多情 提交于 2019-12-24 07:00:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!