Skip to main content

Asynchronous cutout screen callback information (Cutout Result)

Return Result

CutoutRect

Denotes the rectangular area of the Android screen coordinate system; (0, 0) is always the top left corner of the phone screen.

Member VariablesTypeExplanation
TopintTop coordinate of the rectangle (px)
LeftintLeft coordinate of the rectangle (px)
BottomintBottom coordinate of the rectangle (px)
RightintRight coordinate of the rectangle (px)

Example Reference

{
Top: 0,
Left: 457,
Bottom: 79,
Right: 624
}

CutoutInfo

Inherited from INTLBaseResult, and contains information related to oddly-shaped screens.

Member variableTypeExplanation
HasCutoutboolExistence of cutout screen hardware
IsCutoutHiddenboolSome devices allow users to fill the cutout screen section with black color
ScreenHeightintScreen height (px)
ScreenWidthintScreen width (px)
StatusBarHeightintStatus bar height (px)
CutoutRectsList<INTLCutoutRect>Cutout screen area
SafeAreaINTLCutoutRectSafe area

Example 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: {
}
}