Simulator: iPad3 skin dpi is like Android hdpi device

3 views
Skip to first unread message

P5music

unread,
Aug 10, 2020, 5:05:16 AM8/10/20
to CodenameOne Discussions
I am using the simulator with iPad3 skin.
If I call Display.getInstance().getDeviceDensity(), the result corresponds to hdpi Android device, that is not for Apple devices too.
Is it right?

Steve Hannah

unread,
Aug 10, 2020, 8:50:38 AM8/10/20
to codenameone...@googlegroups.com
This is for all devices.  While many of the names correspond to Android's naming, this density reading should be accurate for all devices.   You can get exact conversion from MM to Pixels using CN.convertToPixels().

--
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 codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/a74b3b8c-6b89-4855-ac16-84346062662bo%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages