Cutout Result
Return value
CutoutRect
Represents the rectangular area that is defined by the Android screen coordinate system. (0, 0) is always the upper left corner of the screen.
Member Variable | Type | Description |
---|---|---|
Top | int | Rectangle top coordinate (px) |
Left | int | Rectangle left coordinate (px) |
Bottom | int | Rectangle bottom coordinate (px) |
Right | int | Rectangle right coordinate (px) |
Sample for reference
{
Top: 0,
Left: 457,
Bottom: 79,
Right: 624
}
CutoutInfo
Inherits from INTLBaseResult, includes information about the notched display.
Member Variable | Type | Description |
---|---|---|
HasCutout | bool | Whether the device has a notched display |
IsCutoutHidden | bool | Some devices allow users to fill the gaps of special-shaped screens with black |
ScreenHeight | int | Screen height (px) |
ScreenWidth | int | Screen width (px) |
StatusBarHeight | int | Status bar height (px) |
CutoutRects | List<INTLCutoutRect> | Special-shaped screen area |
SafeArea | INTLCutoutRect | Safe area |
Sample for reference
{
HasCutout: true,
IsCutoutHidden: false,
CutoutRects: [{Top: 0, Bottom: 79, Left: 457, Right: 624}],
SafeArea: {Top: 79, Bottom: 2400, Left: 0, Right: 1080},
ScreenHeight: 2400,
ScreenWidth: 1080,
StatusBarHeight: 79,
MethodId: 1501,
RetCode: 0,
RetMsg: Success,
ThirdCode: -1,
ThirdMsg: "",
ExtraJson: {
}
}