Home » Android » NDK / Middleware / HAL » How to set value for ro.sf.lcd_density in android with display 1280*800 ?

How to set value for ro.sf.lcd_density in android with display 1280*800 ?

The value you set for ro.sf.lcd_density in Android typically depends on the desired display density or DPI (dots per inch) you want to achieve. The density value affects how elements on the screen are sized and laid out.

For a display with a resolution of 1280×800, determining the appropriate density involves calculating the physical size of the screen and the desired DPI. The formula to calculate DPI is:

So, for a 7-inch display with a resolution of 1280×800, the calculated DPI is approximately 215.69 DPI.

Now, you can set ro.sf.lcd_density to this value (or any other value you prefer) in the build.prop file or through ADB:

$ adb shell setprop ro.sf.lcd_density 215

After setting the density, you may need to reboot your device or restart the Android system UI for the changes to take effect. Keep in mind that changing the density can affect the appearance and layout of the user interface, potentially making elements larger or smaller depending on the new DPI setting. Adjust the density according to your preferences and usability requirements.


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment