Selects a scale value for the application based on the screen density (sometimes density is called DPI or PPI).
Available since
1.0.0
.See also:
Constructor
Methods
addScaleForDensity(density:Float, scale:Float):Void
Adds a new scale for the specified screen density.
calculator.addScaleForDensity(160, 1);
calculator.addScaleForDensity(240, 1.5);
calculator.addScaleForDensity(320, 2);
calculator.addScaleForDensity(480, 3);
removeScaleForDensity(density:Float):Void
Removes an application scale that was added with addScaleForDensity()
.
selector.addScaleForDensity(320, 2);
selector.removeScaleForDensity(320);
See also: