Packagefeathers.system
Classpublic class DeviceCapabilities
InheritanceDeviceCapabilities Inheritance Object

Product Version : Feathers 1.0.0

Using values from the Stage and Capabilities classes, makes educated guesses about the physical size of the device this code is running on.



Public Properties
 PropertyDefined By
  dpi : int
[static] The screen density to be used by Feathers.
DeviceCapabilities
  screenPixelHeight : Number = NaN
[static] A custom height, in pixels, to use for calculations of the device's physical screen size.
DeviceCapabilities
  screenPixelWidth : Number = NaN
[static] A custom width, in pixels, to use for calculations of the device's physical screen size.
DeviceCapabilities
  tabletScreenMinimumInches : Number = 5
[static] The minimum physical size, in inches, of the device's larger side to be considered a tablet.
DeviceCapabilities
Public Methods
 MethodDefined By
  
isPhone(stage:Stage):Boolean
[static] Determines if this device is probably a phone, based on the physical width and height, in inches, calculated using the full-screen dimensions and the screen density.
DeviceCapabilities
  
isTablet(stage:Stage):Boolean
[static] Determines if this device is probably a tablet, based on the physical width and height, in inches, calculated using the full-screen dimensions and the screen density.
DeviceCapabilities
  
screenInchesX(stage:Stage):Number
[static] The physical width of the device, in inches.
DeviceCapabilities
  
screenInchesY(stage:Stage):Number
[static] The physical height of the device, in inches.
DeviceCapabilities
Property Detail
dpiproperty
public static var dpi:int

The screen density to be used by Feathers. Defaults to the value of flash.system.Capabilities.screenDPI, but may be overridden. For example, if one wishes to demo a mobile app in a desktop browser, a custom screen density will override the real density of the desktop screen.

Warning: You should avoid changing this value on a mobile device because it may result in unexpected side effects. In addition to being used to scale components in the example themes, the screen density is used by components such as Scroller (and its subclasses like List and ScrollContainer) to optimize the scrolling behavior. Reporting a different screen density may cause some components to appear poorly responsive (or overly sensitive) to touches.

The default value is flash.system.Capabilities.screenDPI.

See also

screenPixelHeightproperty 
public static var screenPixelHeight:Number = NaN

A custom height, in pixels, to use for calculations of the device's physical screen size. Set to NaN to use the actual height.

The default value is flash.display.Stage.fullScreenHeight.

See also

screenPixelWidthproperty 
public static var screenPixelWidth:Number = NaN

A custom width, in pixels, to use for calculations of the device's physical screen size. Set to NaN to use the actual width.

The default value is flash.display.Stage.fullScreenWidth.

See also

tabletScreenMinimumInchesproperty 
public static var tabletScreenMinimumInches:Number = 5

The minimum physical size, in inches, of the device's larger side to be considered a tablet.

The default value is 5.

See also

Method Detail
isPhone()method
public static function isPhone(stage:Stage):Boolean

Determines if this device is probably a phone, based on the physical width and height, in inches, calculated using the full-screen dimensions and the screen density.

Parameters

stage:Stage

Returns
Boolean

See also

isTablet()method 
public static function isTablet(stage:Stage):Boolean

Determines if this device is probably a tablet, based on the physical width and height, in inches, calculated using the full-screen dimensions and the screen density.

Parameters

stage:Stage

Returns
Boolean

See also

screenInchesX()method 
public static function screenInchesX(stage:Stage):Number

The physical width of the device, in inches. Calculated using the full-screen width and the screen density.

Parameters

stage:Stage

Returns
Number

See also

screenInchesY()method 
public static function screenInchesY(stage:Stage):Number

The physical height of the device, in inches. Calculated using the full-screen height and the screen density.

Parameters

stage:Stage

Returns
Number

See also