This question is related to https://groups.google.com/g/codenameone-discussions/c/ohobrY3v83s/m/ypQ8fmnvAQAJ
In my code there is the need to have a standard length. The instruction to do so is: int frameHeight= (int) (Utils.dpi()* 0.393701); This should be a centimeter. (Utils.dpi() is a convenience method to get the dpi from the Display. getInstance().getDeviceDensity() value) I tested it with two skins: Android Note5 (dpi=540 xxhdpi -> 212px) iOS iPad3 (dpi=240 hdpi -> 94px) The length measure is used in some HTML, displayed in a BrowserComponent. When running in simulator I get that the device is different - OK the font size and the icons size or images size are the same - OK the calculated pixels value for 1cm has different size, it is bigger in the Note5 skin. Should I use CN.convertToPixels()? Thanks in advance -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/31789386-3cac-49af-aab1-82a3a84f83d6n%40googlegroups.com.
