mobilePixelDensity

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
mobilePixelDensity()
Summary

Returns the pixel density of the device screen (relative to a non-Retina display)

Introduced5.5.3
OSios, android
Platformsmobile
Example
put mobilePixelDensity() into theScaleFactor
Values
NameTypeDescription
return

The mobilePixelDensity function returns - 2 on a retina display (iOS) - 1 otherwise (iOS) - display metrics (Android)

RelatedCommand: iphoneUseDeviceResolution
Function: iphoneDeviceScale, iphoneDeviceResolution
Description

Use the mobilePixelDensity function to find the scale of the device screen relative to a non-Retinal display on iOS and the display metrics density on Android.

The mobilePixelDensity function returns the scale of the device screen (relative to a non-Retinal display on iOS), this is 2 on a retina display and 1 otherwise. On Android this function returns the display metrics.