Interface IScreen<TProps>

Since

0.1

This class helps you to get device's screen properties like size, orientation, force touch enabled etc. Also you can capture screen with Device.Screen.capture function.

Example

import Screen from '@smartface/native/device/screen';
console.log("Device.Screen.dpi: " + Screen.dpi);
console.log("Device.Screen.width: " + Screen.width);
console.log("Device.Screen.height: " + Screen.height);
console.log("Device.Screen.touchSupported: " + Screen.touchSupported);
console.log("Device.Screen.orientation: " + Screen.orientation);
console.log("Device.Screen.capture(): " + Screen.capture());

Type Parameters

Hierarchy

  • IScreen

Properties

orientation: OrientationType

Gets current device screen orientation.

Android

Ios

Static

Property

Since

0.1

OrientationType: typeof OrientationType

Device.Screen.OrientationType

Static

Since

0.1

height: number

Gets height of device screen.

Android

Ios

Static

Property

Since

0.1

width: number

Gets width of device screen.

Android

Ios

Static

Property

Since

0.1

touchSupported: number

Gets if device screen has feature support for touching.

Android

Ios

Static

Property

Since

0.1

dpi: number

Gets dpi of device screen.

Android

Ios

Static

Property

Since

0.1

ios?: TProps["ios"]

Methods

Generated using TypeDoc