检测屏幕密度编程,pre-蜂窝 [英] Detecting screen density programmatically, pre-Honeycomb
问题描述
我有在某些手机工作的布局,但在三星Galaxy王牌不能正常工作。我需要为这款手机创建一个新的布局(以及类似的),但我不能用编程的这个或这因为这款手机采用Android 2.2以及解决方案是Android 3.2及以上。我如何能为这款手机创建一个新的布局低于Android 3.2的?
I have a layout that works in certain phones, but in the Samsung Galaxy Ace doesn't work properly. I need to create a new layout for this phone (and similar) but I can't do it programmatically with this or this since this phone uses Android 2.2 and those solutions are for Android 3.2 and upwards. How can I create a new layout for this phone below Android 3.2?
推荐答案
我到底做了什么,是创建一个文件夹,名为布局sw320dp其中的Galaxy Nexus将助益,而银河王牌将使用布局正常的布局资料夹,而且我做了相关修改,对每个电话/布局。
What I did in the end, was creating a folder called 'layout-sw320dp' which the Galaxy Nexus will take -while the Galaxy Ace will use the layout in the normal 'layout' folder- and I did the pertinent modifications for each phone/layout.
这篇关于检测屏幕密度编程,pre-蜂窝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!