Angular Common - Object Structures - device
This object is returned by the DevExpress.devices.current() and DevExpress.devices.real() methods to provide information on the device on which the application is currently running. Use the fields of this object to get the required information on the device.
You can emulate as if the application runs on another device. For this purpose, use the DevExpress.devices.current() function passing the required device object as a parameter.
The information on the device on which the application is currently running is used to provide an appropriate look and feel for the application. In particular, the styles that are most appropriate for the current device will be applied.
deviceType
The device type can influence how UI components are displayed and behave in the application.
generic
Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme.
grade
The current device can have one of the grades of its performance.
'A'
iPhone 5+ devices, Android 4.4, all other devices.'B'
iPhone 4- devices, Android 4.3 -'C'
No devices with this grade are known now.
Use the grade property when specifying the device on which a particular animation can be used.
DevExpress.animationPresets.registerPreset("my-animation", { animation: 'fade', device: { grade: 'A' }, }); DevExpress.animationPresets.registerPreset("my-animation", { animation: 'none', device: { grade: 'C' } });
In the code above, when the 'my-animation' animation preset is requested, the 'fade' animation will be performed if the current device has the 'A' category and animation will not be performed at all if the current device has the 'C' category.
platform
Depending on the device platform, a corresponding theme is applied to the application. The device platform is set to 'generic' when none of the platforms ('android' or 'ios') are identified. In this instance, a generic "light" or "dark" theme is applied. You can also set the 'generic' platform manually to provide a unique look and feel for the application on any device. For this purpose, use the DevExpress.devices.current(device) function, passing the device object with the platform field set to 'generic' as a parameter.
version
This property accepts an array of numbers, e.g. [8,1], which means that the platform version is "8.1".
The version of the device platform is important for native styling of the application according to the guidelines provided for each platform version.
If you have technical questions, please create a support ticket in the DevExpress Support Center.