Should I change the 'ro.sf.lcd_density' for high DPI display panel?

2,708 views
Skip to first unread message

Matt Lo

unread,
Jun 16, 2009, 5:37:10 AM6/16/09
to android-platform
Dear All,

Recently I'm working on an Android Phone model which has a high DPI
(around 220) display panel with resolution 800x480. Probably because
the high DPI, I find almost every thing on that display is
unacceptable small. During my solution searching, I notice that there
is a property named 'ro.sf.lcd_density' can be configured in /system/
build.prop. After serveral try-and-modify, I find out that it can
result in scaling every thing bigger by increasing that value. I think
maybe somehow it changes the ratio converting dip (density-independent
pixels) to device pixels. But yet I can be sure that whether this is
the right answer to this issue. Any advice?

Another concern is : Could modifying this value result in not being
compatable with some apps on Android market?

Regards,
Matt

Romain Guy

unread,
Jun 16, 2009, 11:32:02 AM6/16/09
to android-...@googlegroups.com
Hi,

This is indeed the value you should be changing for your device.
However, this does not describe the actual density in dpis of your
display, but a "virtual" density. For instance, the HTC Dream has a
183 dpi display, but is set at 160 density. (ro.sf.lcd_density=160)

We do this to harmonize the various resolutions so that app developers
do not have to support too many. Currently, we support the following
densities: 120, 160 and 240. In your case, you should use 240.

Note that high-dpi support will not be complete at least before Donut
is released so you should not plan on releasing any high-dpi/low-dpi
device with Cupcake.

> Another concern is : Could modifying this value result in not being
> compatable with some apps on Android market?

Yes, and that's what Donut will address with a compatibility mode.

--
Romain Guy
Android framework engineer
roma...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support. All such questions should be posted on
public forums, where I and others can see and answer them

Reply all
Reply to author
Forward
0 new messages